diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 22:39:47 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 22:39:47 +0100 |
| commit | 89d074071d250a23264e9ab82bb896af3e5ce674 (patch) | |
| tree | abc9ec9b92d3366217abe568bd0985fe6aabe4d0 /tests/mammoth.tests.js | |
| parent | 720f997476ab2d0ac3cef17b890b423133ae5e7d (diff) | |
Fix image generation
Diffstat (limited to 'tests/mammoth.tests.js')
| -rw-r--r-- | tests/mammoth.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index e963257..f8e799d 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -1,4 +1,5 @@ var assert = require("assert"); +var path = require("path"); var mammoth = require("../") var styles = require("../lib/styles"); @@ -31,4 +32,12 @@ describe('mammoth', function() { assert.equal("<h1>Hello.</h1>", result.html); }); }); + + test('inline images are included in output', function() { + var converter = new mammoth.Converter(); + var docxPath = path.join(__dirname, "test-data/tiny-picture.docx"); + return converter.convertToHtml(docxPath).then(function(result) { + assert.equal(result.html, '<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>'); + }); + }); }) |
