diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-04 18:35:34 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-04 18:35:34 +0000 |
| commit | 774ff6722f9df9fec9f350288023aa500f49df61 (patch) | |
| tree | 5614fdf22d95db01d520676e62fc441ad1ffed17 /tests | |
| parent | 7b1aff9a83f5ca6fcee2e14073f3b0b61fe4733d (diff) | |
Expose convertToMarkdown function
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 8 |
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) { |
