2017-03-07 22:15:53 +00:00
|
|
|
import { Tab } from "../../../docx/run/tab";
|
|
|
|
import { assert } from "chai";
|
2016-07-18 19:17:19 +01:00
|
|
|
|
|
|
|
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");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|