From 774ff6722f9df9fec9f350288023aa500f49df61 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 4 Feb 2015 18:35:34 +0000 Subject: Expose convertToMarkdown function --- tests/mammoth.tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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) { -- cgit v1.2.3