mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve error message for missing file that might be SVG
This commit is contained in:
@@ -135,4 +135,11 @@ describe('SVG input', function () {
|
||||
assert.strictEqual(info.height, 240);
|
||||
assert.strictEqual(info.channels, 4);
|
||||
});
|
||||
|
||||
it('Detects SVG passed as a string', () =>
|
||||
assert.rejects(
|
||||
() => sharp('<svg></svg>').toBuffer(),
|
||||
/Input file is missing, did you mean/
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user