diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-09-07 20:04:58 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-09-07 20:04:58 +0100 |
| commit | e5e37a6f2cfa04e146d534028fbf291aac2a9fe2 (patch) | |
| tree | 82f731589d4534b51b2dd1caf4b51848c0468eb1 /tests/mammoth.tests.js | |
| parent | 97144ee9f557ef4886456972d36583b6b62685d2 (diff) | |
Add support for external images
Diffstat (limited to 'tests/mammoth.tests.js')
| -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 b7f4766..bb3dca2 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -184,6 +184,14 @@ describe('mammoth', function() { }); }); + test('images stored outside of document are included in output', function() { + var docxPath = path.join(__dirname, "test-data/external-picture.docx"); + return mammoth.convertToHtml({path: docxPath}).then(function(result) { + assert.equal(result.value, '<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>'); + assert.deepEqual([], result.messages); + }); + }); + test('simple list is converted to list elements', function() { var docxPath = path.join(__dirname, "test-data/simple-list.docx"); return mammoth.convertToHtml({path: docxPath}).then(function(result) { |
