diff options
Diffstat (limited to 'test/docx/office-xml-reader.tests.js')
| -rw-r--r-- | test/docx/office-xml-reader.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/docx/office-xml-reader.tests.js b/test/docx/office-xml-reader.tests.js index a017315..6adb970 100644 --- a/test/docx/office-xml-reader.tests.js +++ b/test/docx/office-xml-reader.tests.js @@ -4,6 +4,15 @@ var xml = require("../../lib/xml"); var officeXmlReader = require("../../lib/docx/office-xml-reader"); var test = require("../test")(module); +test("read", { + "when document is missing root element then null is returned": function() { + var xmlString = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'; + + return officeXmlReader.read(xmlString).then(function(element) { + assert.strictEqual(element, null); + }); + } +}); test("mc:AlternateContent", { "when mc:Fallback is present then mc:Fallback is read": function() { |
