diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-01-19 22:48:32 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-01-19 22:48:32 +0000 |
| commit | 58cae6030e51481ffb462e52ab6aeb479e0a705d (patch) | |
| tree | 4e12f82c07c63e03812a4e5d09d0d61a007b3e2d /tests | |
| parent | 83feedc21e7ba06625837d3c11461d9e8734bf6c (diff) | |
Operate over a more generic notion of note
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/document-to-html.tests.js | 5 | ||||
| -rw-r--r-- | tests/docx/document-xml-reader.tests.js | 6 |
2 files changed, 6 insertions, 5 deletions
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"); }); |
