From 52ec8fbfc6da3695d98e83e222232aaa3b1dcf43 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 9 Mar 2022 20:56:56 +0000 Subject: Ignore w:u elements when w:val is missing --- test/docx/body-reader.tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 2e53200..f5c8b87 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -512,11 +512,11 @@ test("isUnderline is false if underline element is not present", function() { assert.deepEqual(run.isUnderline, false); }); -test("isUnderline is true if underline element is present without w:val attribute", function() { +test("isUnderline is false if underline element is present without w:val attribute", function() { var underlineXml = new XmlElement("w:u"); var runXml = runWithProperties([underlineXml]); var run = readXmlElementValue(runXml); - assert.equal(run.isUnderline, true); + assert.equal(run.isUnderline, false); }); test("isUnderline is false if underline element is present and w:val is false", function() { @@ -540,7 +540,7 @@ test("isUnderline is false if underline element is present and w:val is none", f assert.equal(run.isUnderline, false); }); -test("isUnderline is false if underline element is present and w:val is not none or falsy", function() { +test("isUnderline is true if underline element is present and w:val is not none or falsy", function() { var underlineXml = new XmlElement("w:u", {"w:val": "single"}); var runXml = runWithProperties([underlineXml]); var run = readXmlElementValue(runXml); -- cgit v1.2.3