added run tests

This commit is contained in:
Dolan Miu
2016-07-12 08:46:26 +01:00
parent ed4f7464e0
commit 54b2c16d7a
2 changed files with 67 additions and 10 deletions

View File

@ -0,0 +1,20 @@
import {TextRun} from "../../../docx/run/text-run";
import {assert} from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("TextRun", () => {
let run: TextRun;
describe("#constructor()", () => {
it("should add text into run", () => {
run = new TextRun("test");
let newJson = jsonify(run);
assert.equal(newJson.root[1].root, "test");
});
});
});