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

28 lines
757 B
TypeScript
Raw Normal View History

2016-03-29 04:10:33 +01:00
/// <reference path="../typings/mocha/mocha.d.ts" />
/// <reference path="../typings/chai/chai.d.ts" />
import * as docx from "../docx";
import {assert} from "chai";
describe('Document', () => {
var document: docx.Document;
beforeEach(() => {
document = new docx.Document();
});
describe('#constructor()', () => {
it("should create valid JSON", () => {
2016-03-31 04:33:06 +01:00
//console.log(JSON.stringify(document, null, " "));
2016-03-29 04:10:33 +01:00
var stringifiedJson = JSON.stringify(document);
var newJson;
try {
newJson = JSON.parse(stringifiedJson);
} catch (e) {
assert.isTrue(false);
}
assert.isTrue(true);
});
});
});