aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mammoth.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 564eb8c..0f9241e 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -87,4 +87,12 @@ describe('mammoth', function() {
assert.equal(result.value, '<ul><li>Apple</li><li>Banana</li></ul>');
});
});
+
+ 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) {
+ assert.equal(result.value, "<p>\n Walking on imported air\n</p>");
+ assert.deepEqual(result.messages, []);
+ });
+ });
})