aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-01-19 23:05:45 +0000
committerMichael Williamson <mike@zwobble.org>2015-01-19 23:05:45 +0000
commit965bd9513da033b9804af8ec29c7fa609a84512c (patch)
tree28027622b24a00bb44fd4a1e9c91462493d78989 /tests/mammoth.tests.js
parent58cae6030e51481ffb462e52ab6aeb479e0a705d (diff)
Add support for endnotes
Diffstat (limited to 'tests/mammoth.tests.js')
-rw-r--r--tests/mammoth.tests.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 08649f4..08eafa4 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -165,17 +165,16 @@ describe('mammoth', function() {
});
test('endnotes are appended to text', function() {
- return;
var docxPath = path.join(__dirname, "test-data/endnotes.docx");
var options = {
generateUniquifier: function() { return 42; }
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput = '<p>Ouch' +
- '<sup><a href="#endnote-42-1" id="endnote-ref-42-1">[1]</a></sup>.' +
- '<sup><a href="#endnote-42-2" id="endnote-ref-42-2">[2]</a></sup></p>' +
- '<ol><li id="endnote-42-1"><p> A tachyon walks into a bar. <a href="#endnote-ref-42-1">↑</a></p></li>' +
- '<li id="endnote-42-2"><p> Fin. <a href="#endnote-ref-42-2">↑</a></p></li></ol>';
+ '<sup><a href="#endnote-42-2" id="endnote-ref-42-2">[1]</a></sup>.' +
+ '<sup><a href="#endnote-42-3" id="endnote-ref-42-3">[2]</a></sup></p>' +
+ '<ol><li id="endnote-42-2"><p> A tachyon walks into a bar. <a href="#endnote-ref-42-2">↑</a></p></li>' +
+ '<li id="endnote-42-3"><p> Fin. <a href="#endnote-ref-42-3">↑</a></p></li></ol>';
assert.equal(result.value, expectedOutput);
// TODO: get rid of warnings
//~ assert.deepEqual(result.messages, []);