From 48108d291a5b158ca6e4f4d830e832c116fd997e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 11 Jun 2014 14:30:32 +0100 Subject: Ignore footnote separators --- tests/docx/footnotes-reader.tests.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/docx/footnotes-reader.tests.js') diff --git a/tests/docx/footnotes-reader.tests.js b/tests/docx/footnotes-reader.tests.js index 512f477..529937d 100644 --- a/tests/docx/footnotes-reader.tests.js +++ b/tests/docx/footnotes-reader.tests.js @@ -20,3 +20,19 @@ describe('readFootnotesXml', function() { assert.deepEqual(footnotes[0].id, "1"); }); }); + +footnoteTypeIsIgnored('continuationSeparator'); +footnoteTypeIsIgnored('separator'); + +function footnoteTypeIsIgnored(type) { + describe('footnotes of type ' + type + ' are ignored', function() { + test('ID and body of footnote are read', function() { + var footnotes = readFootnotesXml({ + root: new XmlElement("w:footnotes", {}, [ + new XmlElement("w:footnote", {"w:id": "1", "w:type": type}, []) + ]) + }); + assert.equal(footnotes.length, 0); + }); + }); +} -- cgit v1.2.3