From 8ca7c5a3432d5bda97012b037d8cd5e079ec782e Mon Sep 17 00:00:00 2001 From: Dolan Date: Sat, 30 Sep 2017 18:00:06 +0100 Subject: [PATCH] Add test --- ts/docx/paragraph/formatting/border.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ts/docx/paragraph/formatting/border.spec.ts b/ts/docx/paragraph/formatting/border.spec.ts index 4e369bd887..c2f09a288f 100644 --- a/ts/docx/paragraph/formatting/border.spec.ts +++ b/ts/docx/paragraph/formatting/border.spec.ts @@ -15,6 +15,18 @@ describe("ThematicBreak", () => { }); describe("#constructor()", () => { + it("should create valid JSON", () => { + const stringifiedJson = JSON.stringify(thematicBreak); + let newJson; + + try { + newJson = JSON.parse(stringifiedJson); + } catch (e) { + assert.isTrue(false); + } + assert.isTrue(true); + }); + it("should create a Thematic Break with correct border properties", () => { const newJson = Utility.jsonify(thematicBreak); const attributes = {