Files
docx-js/ts/tests/docx/document/documentTest.ts

26 lines
589 B
TypeScript
Raw Normal View History

import { assert } from "chai";
2017-03-09 22:31:55 +00:00
import * as docx from "../../../docx";
2016-03-29 04:10:33 +01:00
2016-04-03 05:24:56 +01:00
describe("Document", () => {
2016-05-26 15:08:34 +01:00
let document: docx.Document;
2016-03-29 04:10:33 +01:00
beforeEach(() => {
document = new docx.Document();
});
2016-05-26 15:08:34 +01:00
describe("#constructor()", () => {
2016-03-29 04:10:33 +01:00
it("should create valid JSON", () => {
2017-03-09 22:31:55 +00:00
const stringifiedJson = JSON.stringify(document);
2016-05-26 15:08:34 +01:00
let newJson;
2016-03-29 04:10:33 +01:00
try {
newJson = JSON.parse(stringifiedJson);
} catch (e) {
assert.isTrue(false);
}
assert.isTrue(true);
});
});
2017-03-09 22:31:55 +00:00
});