From 296ac78496e4d94dafd1a4f6f872a1283b796318 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 10 Jun 2014 15:40:05 +0100 Subject: Pass all footnotes into document object --- tests/document-to-html.tests.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 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 f030a72..da9879e 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -199,7 +199,7 @@ describe('DocumentConverter', function() { test('footnote reference is converted to superscript intra-page link', function() { var footnoteReference = new documents.FootnoteReference({ - footnoteId: 4, + footnoteId: "4", body: paragraphOfText("Who's there?") }); var converter = new DocumentConverter(); @@ -210,7 +210,7 @@ describe('DocumentConverter', function() { test('footnotes are included after the main body', function() { var footnoteReference = new documents.FootnoteReference({ - footnoteId: 1 + footnoteId: "4" }); var document = new documents.Document( [new documents.Paragraph([ @@ -218,17 +218,19 @@ describe('DocumentConverter', function() { new documents.Run([footnoteReference]) ])], { - footnotes: [documents.Footnote({ - body: [paragraphOfText("Who's there?")], - id: 1 - })] + footnotes: new documents.Footnotes({ + 4: new documents.Footnote({ + id: "4", + body: [paragraphOfText("Who's there?")] + }) + }) } ); var converter = new DocumentConverter(); return converter.convertToHtml(document).then(function(result) { - var expectedOutput = '

Knock knock1

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

'; + var expectedOutput = '

Knock knock1

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

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