1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import chai = require("chai");
|
7 | import "mocha";
|
8 | import { Record } from "../src/record";
|
9 | const expect = chai.expect;
|
10 |
|
11 | let rec: Record;
|
12 | const data: any = {
|
13 | DOMAIN: "mydomain.com",
|
14 | RATING: "1",
|
15 | RNDINT: "321",
|
16 | SUM: "1",
|
17 | };
|
18 |
|
19 | before(() => {
|
20 | rec = new Record(data);
|
21 | });
|
22 |
|
23 | describe("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 | });
|