From b4e617af3d447f7addd2901d9abaaceb1f9b1d9a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 11 Jun 2014 14:48:39 +0100 Subject: Add uniquifier to footnote IDs --- tests/mammoth.tests.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/mammoth.tests.js') diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 30fba34..b1bb04e 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -93,10 +93,13 @@ describe('mammoth', 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"); - return mammoth.convertToHtml({path: docxPath}).then(function(result) { - var expectedOutput = '

Ouch[1].[2]

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

  2. ' + - '
  3. Fin.

' + 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, []); -- cgit v1.2.3