From a4413f9bc10dbb18d5c5b96ce00143dbfb94f784 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 20:03:02 +0100 Subject: Move unrecognised element test next to ignored element test --- test/docx/body-reader.tests.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 0ae10a8..91c2950 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -381,18 +381,6 @@ describe("readXmlElement: ", function() { function docEmptyCell(properties) { return new documents.TableCell([], properties); } - - test("emits warning on unrecognised element", function() { - var unrecognisedElement = new XmlElement("w:not-an-element"); - var result = readXmlElement(unrecognisedElement); - assert.deepEqual( - result.messages, - [{ - type: "warning", - message: "An unrecognised element was ignored: w:not-an-element" - }] - ); - }); test("w:bookmarkStart is read as a bookmarkStart", function() { var bookmarkStart = new XmlElement("w:bookmarkStart", {"w:name": "_Peter", "w:id": "42"}); @@ -619,6 +607,18 @@ describe("readXmlElement: ", function() { assert.deepEqual(result.messages, [warning("Unsupported break type: page")]); }); + test("emits warning on unrecognised element", function() { + var unrecognisedElement = new XmlElement("w:not-an-element"); + var result = readXmlElement(unrecognisedElement); + assert.deepEqual( + result.messages, + [{ + type: "warning", + message: "An unrecognised element was ignored: w:not-an-element" + }] + ); + }); + test("w:bookmarkEnd is ignored without warning", function() { var ignoredElement = new XmlElement("w:bookmarkEnd"); var result = readXmlElement(ignoredElement); -- cgit v1.2.3