wrote lots of tests

This commit is contained in:
Dolan Miu
2016-07-18 19:17:19 +01:00
parent d23583f9b5
commit 078196c6d6
8 changed files with 151 additions and 6 deletions

View File

@ -0,0 +1,22 @@
import {Tab} from "../../../docx/run/tab";
import {assert} from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("Tab", () => {
let tab: Tab;
beforeEach(() => {
tab = new Tab();
});
describe("#constructor()", () => {
it("should create a Tab with correct root key", () => {
let newJson = jsonify(tab);
assert.equal(newJson.rootKey, "w:tab");
});
});
});