aboutsummaryrefslogtreecommitdiff
path: root/test/docx/notes-reader.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-07-03 19:57:37 +0100
committerMichael Williamson <mike@zwobble.org>2016-07-03 19:57:37 +0100
commitc225bc3f3dbe5c001e8fec119d8f8dadf96ec95b (patch)
tree22e6da4fb93dae0cdbfa99cb6a6a508116a1b5ee /test/docx/notes-reader.tests.js
parentba731d3c8a9408b9d33deb63e0492b54298169c5 (diff)
Return root element directly when reading XML
Diffstat (limited to 'test/docx/notes-reader.tests.js')
-rw-r--r--test/docx/notes-reader.tests.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/docx/notes-reader.tests.js b/test/docx/notes-reader.tests.js
index 79ffed3..85a49f5 100644
--- a/test/docx/notes-reader.tests.js
+++ b/test/docx/notes-reader.tests.js
@@ -11,11 +11,11 @@ describe('readFootnotesXml', function() {
test('ID and body of footnote are read', function() {
var bodyReader = new BodyReader({});
var footnoteBody = [new XmlElement("w:p", {}, [])];
- var footnotes = createFootnotesReader(bodyReader)({
- root: new XmlElement("w:footnotes", {}, [
+ var footnotes = createFootnotesReader(bodyReader)(
+ new XmlElement("w:footnotes", {}, [
new XmlElement("w:footnote", {"w:id": "1"}, footnoteBody)
])
- });
+ );
assert.equal(footnotes.value.length, 1);
assert.deepEqual(footnotes.value[0].body, [new documents.Paragraph([])]);
assert.deepEqual(footnotes.value[0].noteId, "1");
@@ -28,11 +28,11 @@ footnoteTypeIsIgnored('separator');
function footnoteTypeIsIgnored(type) {
describe('footnotes of type ' + type + ' are ignored', function() {
test('ID and body of footnote are read', function() {
- var footnotes = createFootnotesReader()({
- root: new XmlElement("w:footnotes", {}, [
+ var footnotes = createFootnotesReader()(
+ new XmlElement("w:footnotes", {}, [
new XmlElement("w:footnote", {"w:id": "1", "w:type": type}, [])
])
- });
+ );
assert.equal(footnotes.value.length, 0);
});
});