rearranged test locations

This commit is contained in:
Dolan Miu
2016-07-01 22:09:55 +01:00
parent 10554956f2
commit 8ecb8ed8f2
13 changed files with 101 additions and 49 deletions

View File

@ -0,0 +1,29 @@
/// <reference path="../../../typings/mocha/mocha.d.ts" />
/// <reference path="../../../typings/chai/chai.d.ts" />
import {Style} from "../../../docx/paragraph/style";
import {assert} from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("ParagraphStyle", () => {
let style: Style;
describe("#constructor()", () => {
it("should create a style with given value", () => {
style = new Style("test");
let newJson = jsonify(style);
assert.equal(newJson.root[0].root.val, "test");
});
it("should create a style with blank val", () => {
style = new Style("");
let newJson = jsonify(style);
assert.equal(newJson.root[0].root.val, "");
});
});
});