diff options
Diffstat (limited to 'tests/mammoth.tests.js')
| -rw-r--r-- | tests/mammoth.tests.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 0b529dd..7b502a4 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -89,16 +89,17 @@ describe('mammoth', function() { }); test('footnotes are appended to text', function() { - // TODO: generate links back to main body // TODO: don't duplicate footnotes with multiple references var docxPath = path.join(__dirname, "test-data/footnotes.docx"); var options = { generateUniquifier: function() { return 42; } }; return mammoth.convertToHtml({path: docxPath}, options).then(function(result) { - var expectedOutput = '<p>Ouch<sup><a href="#footnote-42-1">[1]</a></sup>.<sup><a href="#footnote-42-2">[2]</a></sup></p>' + - '<ol><li id="footnote-42-1"><p> A tachyon walks into a bar.</p></li>' + - '<li id="footnote-42-2"><p> Fin.</p></li></ol>' + var expectedOutput = '<p>Ouch' + + '<sup><a href="#footnote-42-1" id="footnote-ref-42-1">[1]</a></sup>.' + + '<sup><a href="#footnote-42-2" id="footnote-ref-42-2">[2]</a></sup></p>' + + '<ol><li id="footnote-42-1"><p> A tachyon walks into a bar.</p> <a href="#footnote-ref-42-1">↑</a></li>' + + '<li id="footnote-42-2"><p> Fin.</p> <a href="#footnote-ref-42-2">↑</a></li></ol>' assert.equal(result.value, expectedOutput); // TODO: get rid of warnings //~ assert.deepEqual(result.messages, []); |
