From c345ab716b42186230c4fae87bf0106d8cd6c528 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 2 May 2016 23:32:10 +0100 Subject: [PATCH] fixed all tests --- ts/export/formatter.ts | 2 +- ts/tests/formatterTest.ts | 3 ++- ts/tests/runTest.ts | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/export/formatter.ts b/ts/export/formatter.ts index 7cac7e0c67..27a708ce59 100644 --- a/ts/export/formatter.ts +++ b/ts/export/formatter.ts @@ -7,7 +7,7 @@ export class Formatter { this.replaceKeys(input); input.clearVariables(); var newJson = this.clense(input); - console.log(JSON.stringify(newJson, null, " ")); + //console.log(JSON.stringify(newJson, null, " ")); return newJson; } diff --git a/ts/tests/formatterTest.ts b/ts/tests/formatterTest.ts index 7165c44c16..d93e99fc7d 100644 --- a/ts/tests/formatterTest.ts +++ b/ts/tests/formatterTest.ts @@ -63,7 +63,8 @@ describe("Formatter", () => { }); it("should should change 'p' tag into 'w:p' tag", () => { - var newJson = formatter.format({ "p": "test", "xmlKeys": { "p": "w:p" } }); + var paragraph = new docx.Paragraph(); + var newJson = formatter.format(paragraph); assert.isDefined(newJson["w:p"]); }); diff --git a/ts/tests/runTest.ts b/ts/tests/runTest.ts index 8aefa2b759..70322672f1 100644 --- a/ts/tests/runTest.ts +++ b/ts/tests/runTest.ts @@ -49,7 +49,6 @@ describe('TextRun', () => { it("should add text into run", () => { run = new TextRun("test"); var newJson = jsonify(run); - console.log(newJson.root[1].root) assert.equal(newJson.root[1].root, "test"); }); });