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/document-to-html.tests.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/document-to-html.tests.js') diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index a8cf0ab..51ee625 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -202,9 +202,11 @@ describe('DocumentConverter', function() { footnoteId: "4", body: paragraphOfText("Who's there?") }); - var converter = new DocumentConverter(); + var converter = new DocumentConverter({ + generateUniquifier: function() { return 42; } + }); return converter.convertToHtml(footnoteReference).then(function(result) { - assert.equal(result.value, '[1]'); + assert.equal(result.value, '[1]'); }); }); @@ -227,10 +229,12 @@ describe('DocumentConverter', function() { } ); - var converter = new DocumentConverter(); + var converter = new DocumentConverter({ + generateUniquifier: function() { return 42; } + }); return converter.convertToHtml(document).then(function(result) { - var expectedOutput = '

Knock knock[1]

' + - '
  1. Who\'s there?

'; + var expectedOutput = '

Knock knock[1]

' + + '
  1. Who\'s there?

'; assert.equal(result.value, expectedOutput); }); }); -- cgit v1.2.3