From f9b2d0c27fa9c3407e24dda32301c4f566af8d26 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 11 Jun 2014 15:38:04 +0100 Subject: Generate links back to main body --- tests/document-to-html.tests.js | 6 +++--- tests/mammoth.tests.js | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index 51ee625..cf6fa5b 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -206,7 +206,7 @@ describe('DocumentConverter', function() { generateUniquifier: function() { return 42; } }); return converter.convertToHtml(footnoteReference).then(function(result) { - assert.equal(result.value, '[1]'); + assert.equal(result.value, '[1]'); }); }); @@ -233,8 +233,8 @@ describe('DocumentConverter', function() { 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); }); }); diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 0b529dd..7b502a4 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -89,16 +89,17 @@ describe('mammoth', function() { }); test('footnotes are appended to text', 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"); 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.

' + 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