diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-03-25 12:56:01 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-03-25 12:56:01 +0000 |
| commit | 06cc13300efe79b591690b577a8b2094317ee551 (patch) | |
| tree | 3b5c2c17037ebe71e95ff031557869e14ff9e348 /tests | |
| parent | f559596a8bb78306e596734bc44057656b6a2214 (diff) | |
Add prettyPrint option
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index 564eb8c..a59ade5 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -87,4 +87,11 @@ describe('mammoth', function() { assert.equal(result.value, '<ul><li>Apple</li><li>Banana</li></ul>'); }); }); + + test('newlines and indentation are used if prettyPrint is true', function() { + var docxPath = path.join(__dirname, "test-data/simple-list.docx"); + return mammoth.convertToHtml({path: docxPath}, {prettyPrint: true}).then(function(result) { + assert.equal(result.value, '<ul>\n <li>Apple</li>\n <li>Banana</li>\n</ul>'); + }); + }); }) |
