summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-02-18 11:04:48 +0000
committerMichael Williamson <mike@zwobble.org>2024-02-18 11:04:48 +0000
commit149bf2b104811fca267c1e9c1845dd61f4adfcc9 (patch)
treea43c33f41d1c4a208c135b39a5868d0739d5ea08
parent0459e2cf53ad8670e6692020f5864eafffe2caf9 (diff)
Make test more consistent with other implementations
-rw-r--r--test/docx/document-xml-reader.tests.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/docx/document-xml-reader.tests.js b/test/docx/document-xml-reader.tests.js
index 10c8df1..419fd28 100644
--- a/test/docx/document-xml-reader.tests.js
+++ b/test/docx/document-xml-reader.tests.js
@@ -11,7 +11,9 @@ test("when body element is present then body is read", function() {
var documentXmlReader = new DocumentXmlReader({
bodyReader: bodyReader
});
- var paragraphXml = xml.element("w:p", {}, []);
+ var textXml = xml.element("w:t", {}, [xml.text("Hello!")]);
+ var runXml = xml.element("w:r", {}, [textXml]);
+ var paragraphXml = xml.element("w:p", {}, [runXml]);
var bodyXml = xml.element("w:body", {}, [paragraphXml]);
var documentXml = xml.element("w:document", {}, [bodyXml]);
@@ -19,7 +21,7 @@ test("when body element is present then body is read", function() {
assert.deepEqual(result.messages, []);
assert.deepEqual(result.value, documents.document(
- [documents.paragraph([])],
+ [documents.paragraph([documents.run([documents.text("Hello!")])])],
{}
));
});