From 52c4d01e4a0e35738e8c1db35a5a4a7ab981803d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 25 Jan 2015 17:17:34 +0000 Subject: Use prefix to generate IDs --- tests/document-to-html.tests.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 63b445d..17fdb27 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -290,10 +290,10 @@ describe('DocumentConverter', function() { noteId: "4" }); var converter = new DocumentConverter({ - generateUniquifier: function() { return 42; } + idPrefix: "doc-42" }); return converter.convertToHtml(footnoteReference).then(function(result) { - assert.equal(result.value, '[1]'); + assert.equal(result.value, '[1]'); }); }); @@ -311,7 +311,7 @@ describe('DocumentConverter', function() { notes: new documents.Notes({ 4: new documents.Note({ noteType: "footnote", - id: "4", + noteId: "4", body: [paragraphOfText("Who's there?")] }) }) @@ -319,11 +319,11 @@ describe('DocumentConverter', function() { ); var converter = new DocumentConverter({ - generateUniquifier: function() { return 42; } + idPrefix: "doc-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