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 985dd99..247ef17 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -198,6 +198,14 @@ describe('mammoth', function() {
}
});
+ test('can convert single paragraph to markdown', function() {
+ var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
+ return mammoth.convertToMarkdown({path: docxPath}).then(function(result) {
+ assert.equal(result.value, "Walking on imported air\n\n");
+ assert.deepEqual(result.messages, []);
+ });
+ });
+
test('extractRawText only retains raw text', function() {
var docxPath = path.join(__dirname, "test-data/simple-list.docx");
return mammoth.extractRawText({path: docxPath}).then(function(result) {