wrote lots of tests
This commit is contained in:
22
ts/tests/docx/run/tabTests.ts
Normal file
22
ts/tests/docx/run/tabTests.ts
Normal 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");
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user