From e580cc50fac9440b24854af99f5d0b72594ac0a5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 10 Jun 2014 14:47:44 +0100 Subject: Add failing test for footnotes --- tests/mammoth.tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 90b96e5..093173e 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -88,6 +88,20 @@ describe('mammoth', function() { }); }); + test('footnotes are appended to text', function() { + // TODO: generate unique IDs for footnotes + // TODO: generate links back to main body + // TODO: not yet implemented + return; + var docxPath = path.join(__dirname, "test-data/footnotes.docx"); + return mammoth.convertToHtml({path: docxPath}).then(function(result) { + var expectedOutput = '

Ouch1.2

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

  2. ' + + '
  3. Fin.

' + assert.equal(result.value, expectedOutput); + }); + }); + 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) { -- cgit v1.2.3