Files
docx-js/ts/tests/propertiesTest.ts
2017-03-07 22:15:53 +00:00

25 lines
623 B
TypeScript

import { Properties } from "../properties";
import { assert } from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("Properties", () => {
let properties: Properties;
beforeEach(() => {
});
describe("#constructor()", () => {
it("should create properties with a title", () => {
properties = new Properties({
title: "test document"
});
let newJson = jsonify(properties);
assert(newJson.root[1].root === "test document");
});
});
});