diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 20:03:02 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 20:03:02 +0100 |
| commit | a4413f9bc10dbb18d5c5b96ce00143dbfb94f784 (patch) | |
| tree | ccfed16aaddade225556fb61251146157a67e174 | |
| parent | 73fcb11ac3243ded685aee003e43b8109ccfaf6c (diff) | |
Move unrecognised element test next to ignored element test
| -rw-r--r-- | test/docx/body-reader.tests.js | 24 |
1 files changed, 12 insertions, 12 deletions
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); |
