This commit is contained in:
Dolan
2017-03-09 22:56:08 +00:00
parent 5fac776dca
commit 7022b39d2e
21 changed files with 138 additions and 181 deletions

View File

@ -1,10 +1,6 @@
import { TextRun } from "../../../docx/run/text-run";
import { assert } from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
import { TextRun } from "../../../docx/run/text-run";
import { Utility } from "../../utility";
describe("TextRun", () => {
let run: TextRun;
@ -13,8 +9,8 @@ describe("TextRun", () => {
it("should add text into run", () => {
run = new TextRun("test");
let newJson = jsonify(run);
const newJson = Utility.jsonify(run);
assert.equal(newJson.root[1].root, "test");
});
});
});
});