Files
docx-js/ts/tests/propertiesTest.ts
2016-05-26 15:08:34 +01:00

27 lines
723 B
TypeScript

/// <reference path="../typings/mocha/mocha.d.ts" />
/// <reference path="../typings/chai/chai.d.ts" />
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");
});
});
});