summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaceyshome <jaceyshome@gmail.com>2015-05-23 12:33:25 +1000
committerjaceyshome <jaceyshome@gmail.com>2015-05-23 12:51:31 +1000
commit499eb4cec34350f3e62c4e09ce3b791eb38b334d (patch)
tree6e61bcd97dcbaf45a7c5d9cbd068383f023a07fc
parent429af29e958c8084d27f39a3c9685c043d1f6df3 (diff)
rename the styles-reader.tests last case to 'style name is null if w:name element does not exist'
-rw-r--r--tests/docx/styles-reader.tests.js8
1 files 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}, [])
]);