aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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}, [])
]);