From 52c4d01e4a0e35738e8c1db35a5a4a7ab981803d Mon Sep 17 00:00:00 2001
From: Michael Williamson
Date: Sun, 25 Jan 2015 17:17:34 +0000
Subject: Use prefix to generate IDs
---
tests/mammoth.tests.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'tests/mammoth.tests.js')
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 48ce680..985dd99 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -150,14 +150,14 @@ describe('mammoth', function() {
// TODO: don't duplicate footnotes with multiple references
var docxPath = path.join(__dirname, "test-data/footnotes.docx");
var options = {
- generateUniquifier: function() { return 42; }
+ idPrefix: "doc-42"
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput = 'Ouch' +
- '.' +
- '
' +
- '' +
- '
';
+ '.' +
+ '
' +
+ '' +
+ '
';
assert.equal(result.value, expectedOutput);
assert.deepEqual(result.messages, []);
});
@@ -166,14 +166,14 @@ describe('mammoth', function() {
test('endnotes are appended to text', function() {
var docxPath = path.join(__dirname, "test-data/endnotes.docx");
var options = {
- generateUniquifier: function() { return 42; }
+ idPrefix: "doc-42"
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput = 'Ouch' +
- '[1].' +
- '[2]
' +
- ' A tachyon walks into a bar. ↑
' +
- ' Fin. ↑
';
+ '[1].' +
+ '[2]' +
+ ' A tachyon walks into a bar. ↑
' +
+ ' Fin. ↑
';
assert.equal(result.value, expectedOutput);
assert.deepEqual(result.messages, []);
});
--
cgit v1.2.3