From 5a0b91e72fc89695fcb92ed5306587a64570ddd0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 19 Jan 2015 19:47:41 +0000 Subject: Add disabled test for endnotes --- tests/mammoth.tests.js | 18 ++++++++++++++++++ tests/test-data/endnotes.docx | Bin 0 -> 4253 bytes 2 files changed, 18 insertions(+) create mode 100644 tests/test-data/endnotes.docx diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 32bc281..08649f4 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -164,6 +164,24 @@ 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 = '

Ouch' + + '[1].' + + '[2]

' + + '
  1. A tachyon walks into a bar. ↑

  2. ' + + '
  3. Fin. ↑

'; + assert.equal(result.value, expectedOutput); + // TODO: get rid of warnings + //~ assert.deepEqual(result.messages, []); + }); + }); + test('indentation is used if prettyPrint is true', function() { var docxPath = path.join(__dirname, "test-data/single-paragraph.docx"); return mammoth.convertToHtml({path: docxPath}, {prettyPrint: true}).then(function(result) { diff --git a/tests/test-data/endnotes.docx b/tests/test-data/endnotes.docx new file mode 100644 index 0000000..5ec7faf Binary files /dev/null and b/tests/test-data/endnotes.docx differ -- cgit v1.2.3