@ -34,6 +34,6 @@ describe('compareImages', () => {
fs.readFileSync('./demoassets/People.jpg'),
'bogus data'
);
await expect(promise).rejects.toMatch('Image load error.');
await expect(promise).rejects.toMatch('Error: error while reading from input stream');
});
@ -64,7 +64,7 @@ describe('resemble', () => {
.onComplete(function(data) {
// console.info('Reached oncomplete for request_404');
// console.log(data);
expect(data.error).toEqual('Image load error.');
expect(data.error).toEqual('Error: error while reading from input stream');
resolve();
@ -190,9 +190,9 @@ URL: https://github.com/Huddle/Resemble.js
hiddenImage.setAttribute('crossorigin', 'anonymous');
}
hiddenImage.onerror = function () {
hiddenImage.onerror = function (err) {
hiddenImage.onerror = null; //fixes pollution between calls
images.push({ error : "Image load error."});
images.push({ error : err ? err + "" : "Image load error" });
callback();
};