aboutsummaryrefslogtreecommitdiff
path: root/tests/docx/notes-reader.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-07-03 19:19:21 +0100
committerMichael Williamson <mike@zwobble.org>2016-07-03 19:20:00 +0100
commit0b56dfce42c3944cce47e284608e6806f4c839c3 (patch)
tree5f96f9c2908f1c5b00a7192e71d4c192abd7cf47 /tests/docx/notes-reader.tests.js
parent627c4a755395e313234bdb1914d168392006c483 (diff)
Move tests to test for easier Mocha usage
Diffstat (limited to 'tests/docx/notes-reader.tests.js')
-rw-r--r--tests/docx/notes-reader.tests.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/docx/notes-reader.tests.js b/tests/docx/notes-reader.tests.js
deleted file mode 100644
index 79ffed3..0000000
--- a/tests/docx/notes-reader.tests.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var assert = require("assert");
-
-var createFootnotesReader = require("../../lib/docx/notes-reader").createFootnotesReader;
-var BodyReader = require("../../lib/docx/body-reader").BodyReader;
-var documents = require("../../lib/documents");
-var XmlElement = require("../../lib/xml").Element;
-var test = require("../testing").test;
-
-
-describe('readFootnotesXml', function() {
- test('ID and body of footnote are read', function() {
- var bodyReader = new BodyReader({});
- var footnoteBody = [new XmlElement("w:p", {}, [])];
- var footnotes = createFootnotesReader(bodyReader)({
- root: new XmlElement("w:footnotes", {}, [
- new XmlElement("w:footnote", {"w:id": "1"}, footnoteBody)
- ])
- });
- assert.equal(footnotes.value.length, 1);
- assert.deepEqual(footnotes.value[0].body, [new documents.Paragraph([])]);
- assert.deepEqual(footnotes.value[0].noteId, "1");
- });
-});
-
-footnoteTypeIsIgnored('continuationSeparator');
-footnoteTypeIsIgnored('separator');
-
-function footnoteTypeIsIgnored(type) {
- describe('footnotes of type ' + type + ' are ignored', function() {
- test('ID and body of footnote are read', function() {
- var footnotes = createFootnotesReader()({
- root: new XmlElement("w:footnotes", {}, [
- new XmlElement("w:footnote", {"w:id": "1", "w:type": type}, [])
- ])
- });
- assert.equal(footnotes.value.length, 0);
- });
- });
-}