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

23 lines
618 B
TypeScript
Raw Normal View History

/// <reference path="../typings/mocha/mocha.d.ts" />
/// <reference path="../typings/chai/chai.d.ts" />
import {Styles} from "../styles";
import {assert} from "chai";
describe("Styles", () => {
2016-05-26 15:08:34 +01:00
let styles: Styles;
beforeEach(() => {
styles = new Styles();
});
2016-05-26 15:08:34 +01:00
describe("#constructor()", () => {
2016-05-17 23:38:09 +01:00
it("should create styles with correct rootKey", () => {
2016-05-26 15:08:34 +01:00
let styles = new Styles();
let stringifiedJson = JSON.stringify(styles);
let newJson = JSON.parse(stringifiedJson);
2016-05-17 23:38:09 +01:00
assert.equal(newJson.rootKey, "w:styles");
});
});
});