From 58cae6030e51481ffb462e52ab6aeb479e0a705d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 19 Jan 2015 22:48:32 +0000 Subject: Operate over a more generic notion of note --- tests/document-to-html.tests.js | 5 +++-- tests/docx/document-xml-reader.tests.js | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index a1c7a61..a5cf294 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -306,8 +306,9 @@ describe('DocumentConverter', function() { new documents.Run([footnoteReference]) ])], { - footnotes: new documents.Footnotes({ - 4: new documents.Footnote({ + notes: new documents.Notes({ + 4: new documents.Note({ + noteType: "footnote", id: "4", body: [paragraphOfText("Who's there?")] }) diff --git a/tests/docx/document-xml-reader.tests.js b/tests/docx/document-xml-reader.tests.js index 175b3c4..778bf06 100644 --- a/tests/docx/document-xml-reader.tests.js +++ b/tests/docx/document-xml-reader.tests.js @@ -353,15 +353,15 @@ describe("readXmlElement: ", function() { describe("convertXmlToDocument: ", function() { - test("footnotes of document are read", function() { + test("notes of document are read", function() { var paragraphXml = new XmlElement("w:p", {}, []); - var footnotes = [{id: "4", body: [paragraphXml]}]; + var footnotes = [{noteType: "footnote", id: "4", body: [paragraphXml]}]; var bodyXml = new XmlElement("w:body", {}, []); var documentXml = new XmlElement("w:document", {}, [bodyXml]); var document = convertXmlToDocumentValue({root: documentXml}, {footnotes: footnotes}); - var footnote = document.footnotes.findFootnoteById("4"); + var footnote = document.notes.findFootnoteById("4"); assert.deepEqual(footnote.id, "4"); assert.deepEqual(footnote.body[0].type, "paragraph"); }); -- cgit v1.2.3