From 8a64667ff8b1a6d8953c1a466622d67e165f9f23 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 19 Jan 2019 12:44:14 -0500 Subject: [PATCH] fix(deps): update dependency sharp to v0.21.3 (#7267) * fix(deps): update dependency sharp to v0.21.3 * fix: tests for new sharp version errors --- install/package.json | 2 +- test/uploads.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/install/package.json b/install/package.json index 515d5e8d7e..ff763fbf7b 100644 --- a/install/package.json +++ b/install/package.json @@ -110,7 +110,7 @@ "sanitize-html": "^1.16.3", "semver": "^5.4.1", "serve-favicon": "^2.4.5", - "sharp": "0.21.2", + "sharp": "0.21.3", "sitemap": "^2.0.0", "socket.io": "2.2.0", "socket.io-adapter-cluster": "^1.0.1", diff --git a/test/uploads.js b/test/uploads.js index 077ce55704..578b99515d 100644 --- a/test/uploads.js +++ b/test/uploads.js @@ -158,14 +158,21 @@ describe('Upload Controllers', function () { it('should fail if file is not an image', function (done) { file.isFileTypeAllowed(path.join(__dirname, '../test/files/notanimage.png'), function (err) { - assert.equal(err.message, 'Input file is missing or of an unsupported image format'); + assert.equal(err.message, 'Input file contains unsupported image format'); done(); }); }); it('should fail if file is not an image', function (done) { image.size(path.join(__dirname, '../test/files/notanimage.png'), function (err) { - assert.equal(err.message, 'Input file is missing or of an unsupported image format'); + assert.equal(err.message, 'Input file contains unsupported image format'); + done(); + }); + }); + + it('should fail if file is missing', function (done) { + image.size(path.join(__dirname, '../test/files/doesnotexist.png'), function (err) { + assert.equal(err.message, 'Input file is missing'); done(); }); });