From 499eb4cec34350f3e62c4e09ce3b791eb38b334d Mon Sep 17 00:00:00 2001 From: jaceyshome Date: Sat, 23 May 2015 12:33:25 +1000 Subject: rename the styles-reader.tests last case to 'style name is null if w:name element does not exist' --- tests/docx/styles-reader.tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/docx/styles-reader.tests.js b/tests/docx/styles-reader.tests.js index bd28673..0bbc8ff 100644 --- a/tests/docx/styles-reader.tests.js +++ b/tests/docx/styles-reader.tests.js @@ -60,11 +60,11 @@ describe('readStylesXml', function() { assert.equal(styles.findParagraphStyleById("Heading1").name, "Heading 1"); }); - test('styles names should be null by default', function() { + test('style name is null if w:name element does not exist', function() { var styles = readStylesXml({ root: new XmlElement("w:styles", {}, [ - unusualStyleElement("paragraph", "Heading1", "Heading 1"), - unusualStyleElement("character", "Heading1Char", "Heading1Char 1") + styleWithoutWNameElement("paragraph", "Heading1", "Heading 1"), + styleWithoutWNameElement("character", "Heading1Char", "Heading1Char 1") ]) }); assert.equal(styles.findParagraphStyleById("Heading1").name, null); @@ -87,7 +87,7 @@ function styleElement(type, id, name) { ]); } -function unusualStyleElement(type, id, name) { +function styleWithoutWNameElement(type, id, name) { return new XmlElement("w:style", {"w:type": type, "w:styleId": id}, [ new XmlElement("w:notName", {"w:val": name}, []) ]); -- cgit v1.2.3