From 091111ce4b0bece922d814a63e8f294cf52b79a6 Mon Sep 17 00:00:00 2001 From: Tobias Bocanegra Date: Mon, 7 Sep 2020 14:52:12 +0900 Subject: Fix: Underline with value 'none' is wrongly detected fixes #249 --- test/docx/body-reader.tests.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index 48f6b16..50506ae 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -459,6 +459,13 @@ test("isUnderline is true if underline element is present", function() { assert.equal(run.isUnderline, true); }); +test("isUnderline is false if underline element is 'none'", function() { + var underlineXml = new XmlElement("w:u", {"w:val": "none"}); + var runXml = runWithProperties([underlineXml]); + var run = readXmlElementValue(runXml); + assert.equal(run.isUnderline, false); +}); + test("isStrikethrough is false if strikethrough element is not present", function() { var runXml = runWithProperties([]); var run = readXmlElementValue(runXml); -- cgit v1.2.3