UNPKG

744 BPlain TextView Raw
1"use strict";
2
3/* tslint:disable:no-unused-expression */
4// https://github.com/palantir/tslint/issues/2614
5
6import chai = require("chai");
7import "mocha";
8import { Record } from "../src/record";
9const expect = chai.expect;
10
11let rec: Record;
12const data: any = {
13 DOMAIN: "mydomain.com",
14 RATING: "1",
15 RNDINT: "321",
16 SUM: "1",
17};
18
19before(() => {
20 rec = new Record(data);
21});
22
23describe("Record class", function () {
24 this.slow(1000);
25
26 describe("#.getData", () => {
27 it("check return value", () => {
28 expect(rec.getData()).to.equal(data);
29 });
30 });
31
32 describe("#.getDataByKey", () => {
33 it("check return value [column key not found]", () => {
34 expect(rec.getDataByKey("KEYNOTEXISTING")).to.be.null;
35 });
36 });
37});