aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaceyshome <jaceyshome@gmail.com>2015-05-24 09:42:02 +1000
committerjaceyshome <jaceyshome@gmail.com>2015-05-24 09:42:02 +1000
commit60d6d9e584c44c3beae16110b6685a0a86bc38b4 (patch)
tree7031043b17813ab6edf031c38943217e9d87cd07
parenta552c6a51a1fe8842bd557d637eb833f0d1c42b4 (diff)
remove redundant code in styles-reader test case 'style name is null if w:name element does not exist'
-rw-r--r--tests/docx/styles-reader.tests.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/docx/styles-reader.tests.js b/tests/docx/styles-reader.tests.js
index 0bbc8ff..73a9050 100644
--- a/tests/docx/styles-reader.tests.js
+++ b/tests/docx/styles-reader.tests.js
@@ -63,8 +63,8 @@ describe('readStylesXml', function() {
test('style name is null if w:name element does not exist', function() {
var styles = readStylesXml({
root: new XmlElement("w:styles", {}, [
- styleWithoutWNameElement("paragraph", "Heading1", "Heading 1"),
- styleWithoutWNameElement("character", "Heading1Char", "Heading1Char 1")
+ styleWithoutWNameElement("paragraph", "Heading1"),
+ styleWithoutWNameElement("character", "Heading1Char")
])
});
assert.equal(styles.findParagraphStyleById("Heading1").name, null);
@@ -87,8 +87,6 @@ function styleElement(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}, [])
- ]);
+function styleWithoutWNameElement(type, id) {
+ return new XmlElement("w:style", {"w:type": type, "w:styleId": id}, []);
}