From 149bf2b104811fca267c1e9c1845dd61f4adfcc9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 18 Feb 2024 11:04:48 +0000 Subject: Make test more consistent with other implementations --- test/docx/document-xml-reader.tests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/docx/document-xml-reader.tests.js') 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!")])])], {} )); }); -- cgit v1.2.3