aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-06-17 15:40:21 +0100
committerMichael Williamson <mike@zwobble.org>2015-06-17 15:40:21 +0100
commita52d99fd85061a9f20b481535407a225d5927434 (patch)
tree6cea0c2d11a263a959df251eb7be1af2455b6440 /tests/mammoth.tests.js
parentdc53892204989de1788081624c65062dc283480a (diff)
Allow strikethrough to be configured in style mapping
Diffstat (limited to 'tests/mammoth.tests.js')
-rw-r--r--tests/mammoth.tests.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index cdc14e5..d4d7ef4 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -231,6 +231,13 @@ describe('mammoth', function() {
});
});
+ test('strikethrough conversion can be configured with style mappings', function() {
+ var docxPath = path.join(__dirname, "test-data/strikethrough.docx");
+ return mammoth.convertToHtml({path: docxPath}, {styleMap: "strike => del"}).then(function(result) {
+ assert.equal(result.value, "<p><del>Today's Special: Salmon</del> Sold out</p>");
+ });
+ });
+
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) {