From d23583f9b5ed9b5c98a831a0b1d2f8ec158e226c Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 18 Jul 2016 18:49:11 +0100 Subject: [PATCH] break tests --- ts/tests/docx/run/breakTests.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ts/tests/docx/run/breakTests.ts diff --git a/ts/tests/docx/run/breakTests.ts b/ts/tests/docx/run/breakTests.ts new file mode 100644 index 0000000000..56fad8342e --- /dev/null +++ b/ts/tests/docx/run/breakTests.ts @@ -0,0 +1,22 @@ +import {Break} from "../../../docx/run/break"; +import {assert} from "chai"; + +function jsonify(obj: Object) { + let stringifiedJson = JSON.stringify(obj); + return JSON.parse(stringifiedJson); +} + +describe.only("Break", () => { + let currentBreak: Break; + + beforeEach(() => { + currentBreak = new Break(); + }); + + describe("#constructor()", () => { + it("should create a Break with correct root key", () => { + let newJson = jsonify(currentBreak); + assert.equal(newJson.rootKey, "w:br"); + }); + }); +}); \ No newline at end of file