diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-06-11 14:30:32 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-06-11 14:30:32 +0100 |
| commit | 48108d291a5b158ca6e4f4d830e832c116fd997e (patch) | |
| tree | bf00c0eb8dd3d95998979b8f6bfb1a64043174be /tests | |
| parent | 1b34a534ed15dab39e6805f29526a01f0394eea4 (diff) | |
Ignore footnote separators
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/docx/footnotes-reader.tests.js | 16 |
1 files changed, 16 insertions, 0 deletions
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); + }); + }); +} |
