diff options
| author | Andrej T <andrejtrajchevski@gmail.com> | 2016-07-08 09:40:11 +0200 |
|---|---|---|
| committer | Andrej T <andrejtrajchevski@gmail.com> | 2016-07-08 09:40:11 +0200 |
| commit | 7dba15069f9a606b9e248d7e4cd024ddaa6ac3e3 (patch) | |
| tree | f9c9918fe503e71d79c352e1fdd334650afce783 | |
| parent | 1040a8aa3f7e54d2d120d27ce58136dddabb4849 (diff) | |
expect an error in images-with-no-path test
| -rw-r--r-- | test/mammoth.tests.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/mammoth.tests.js b/test/mammoth.tests.js index 622fcbb..b01b65d 100644 --- a/test/mammoth.tests.js +++ b/test/mammoth.tests.js @@ -192,12 +192,13 @@ describe('mammoth', function() { }); }); - test('warn if images stored outside of document are specified when passing file without path', function() { + test('error if images stored outside of document are specified when passing file without path', function() { var docxPath = path.join(__dirname, "test-data/external-picture.docx"); var buffer = fs.readFileSync(docxPath); return mammoth.convertToHtml({buffer: buffer}).then(function(result) { assert.equal(result.value, ''); - assert.equal(result.messages[0].message, results.error("could not find external image 'tiny-picture.png', path of input document is unknown").message); + assert.equal(result.messages[0].message, "could not find external image 'tiny-picture.png', path of input document is unknown"); + assert.equal(result.messages[0].type, "error"); }); }); |
