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

27 lines
722 B
TypeScript
Raw Normal View History

2016-04-03 20:00:30 +01:00
/// <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) {
var stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("Properties", () => {
var properties: Properties;
beforeEach(() => {
});
describe("#constructor()", () => {
it("should create properties with a title", () => {
properties = new Properties({
title: "test document"
});
var newJson = jsonify(properties);
2016-05-02 22:39:03 +01:00
assert(newJson.root[1].root === "test document");
2016-04-03 20:00:30 +01:00
});
})
});