lik/test/test.js
2016-07-22 00:16:45 +02:00

32 lines
2.9 KiB
JavaScript

"use strict";
require("typings-test");
const lik = require("../dist/index");
require("should");
describe("lik", function () {
describe("Stringmap", function () {
let testStringmap;
let testString1 = "testString1";
let testString2 = "testString2";
let testString3 = "testString3";
it("should create an instance of Stringmap", function () {
testStringmap = new lik.Stringmap();
testStringmap.should.be.instanceof(lik.Stringmap);
});
it("should return false for an string not in Stringmap", function () {
testStringmap.checkString(testString1).should.be.false();
});
it("should add an string to Stringmap", function () {
testStringmap.addString(testString1);
testStringmap.addString(testString2);
testStringmap.addString(testString3);
testStringmap.checkString(testString1).should.be.true();
testStringmap.checkString(testString2).should.be.true();
testStringmap.checkString(testString3).should.be.true();
});
it("should remove a string from Stringmap", function () {
testStringmap.removeString(testString2);
testStringmap.checkString(testString2).should.be.false();
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsTUFBTyxHQUFHLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFDdEMsUUFBTyxRQUFRLENBQUMsQ0FBQTtBQUVoQixRQUFRLENBQUMsS0FBSyxFQUFDO0lBQ1gsUUFBUSxDQUFDLFdBQVcsRUFBQztRQUNqQixJQUFJLGFBQTJCLENBQUM7UUFDaEMsSUFBSSxXQUFXLEdBQUcsYUFBYSxDQUFDO1FBQ2hDLElBQUksV0FBVyxHQUFHLGFBQWEsQ0FBQztRQUNoQyxJQUFJLFdBQVcsR0FBRyxhQUFhLENBQUM7UUFDaEMsRUFBRSxDQUFDLHdDQUF3QyxFQUFDO1lBQ3hDLGFBQWEsR0FBRyxJQUFJLEdBQUcsQ0FBQyxTQUFTLEVBQUUsQ0FBQztZQUNwQyxhQUFhLENBQUMsTU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