From 7dba15069f9a606b9e248d7e4cd024ddaa6ac3e3 Mon Sep 17 00:00:00 2001 From: Andrej T Date: Fri, 8 Jul 2016 09:40:11 +0200 Subject: expect an error in images-with-no-path test --- test/mammoth.tests.js | 5 +++-- 1 file 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"); }); }); -- cgit v1.2.3