fix(deps): update dependency sharp to v0.21.3 ()

* fix(deps): update dependency sharp to v0.21.3

* fix: tests for new sharp version errors
v1.18.x
renovate[bot] committed by Julian Lam
parent 5607261cde
commit 8a64667ff8

@ -110,7 +110,7 @@
"sanitize-html": "^1.16.3", "sanitize-html": "^1.16.3",
"semver": "^5.4.1", "semver": "^5.4.1",
"serve-favicon": "^2.4.5", "serve-favicon": "^2.4.5",
"sharp": "0.21.2", "sharp": "0.21.3",
"sitemap": "^2.0.0", "sitemap": "^2.0.0",
"socket.io": "2.2.0", "socket.io": "2.2.0",
"socket.io-adapter-cluster": "^1.0.1", "socket.io-adapter-cluster": "^1.0.1",

@ -158,14 +158,21 @@ describe('Upload Controllers', function () {
it('should fail if file is not an image', function (done) { it('should fail if file is not an image', function (done) {
file.isFileTypeAllowed(path.join(__dirname, '../test/files/notanimage.png'), function (err) { 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(); done();
}); });
}); });
it('should fail if file is not an image', function (done) { it('should fail if file is not an image', function (done) {
image.size(path.join(__dirname, '../test/files/notanimage.png'), function (err) { 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(); done();
}); });
}); });

Loading…
Cancel
Save