aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-06-10 14:47:44 +0100
committerMichael Williamson <mike@zwobble.org>2014-06-10 14:47:44 +0100
commite580cc50fac9440b24854af99f5d0b72594ac0a5 (patch)
tree51e77659b262bfda98a6a68721c354d7a84b84ec
parent01cb1553886a8f110ffc03f30a15dcde00d0f899 (diff)
Add failing test for footnotes
-rw-r--r--tests/mammoth.tests.js14
1 files changed, 14 insertions, 0 deletions
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 = '<p>Ouch<sup><a href="#footnote-1">1</a></sup>.<sup><a href="#footnote-2">2</a></sup></p>' +
+ '<ol><li id="footnote-1"><p> A tachyon walks into a bar.</p></li>' +
+ '<li id="footnote-2"><p> Fin.</p></li></ol>'
+ 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) {