mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Upgrade to libvips v8.14.0-rc1
- Replace GIF 'optimise' option with 'reuse' - Add 'progressive' option to GIF - Add 'wrap' option to text creation - Add 'formatMagick' property to *magick input metadata
This commit is contained in:
@@ -294,4 +294,24 @@ describe('Text to image', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('valid wrap throws', () => {
|
||||
assert.doesNotThrow(() => sharp({ text: { text: 'text', wrap: 'none' } }));
|
||||
assert.doesNotThrow(() => sharp({ text: { text: 'text', wrap: 'wordChar' } }));
|
||||
});
|
||||
|
||||
it('invalid wrap throws', () => {
|
||||
assert.throws(
|
||||
() => sharp({ text: { text: 'text', wrap: 1 } }),
|
||||
/Expected one of: word, char, wordChar, none for text\.wrap but received 1 of type number/
|
||||
);
|
||||
assert.throws(
|
||||
() => sharp({ text: { text: 'text', wrap: false } }),
|
||||
/Expected one of: word, char, wordChar, none for text\.wrap but received false of type boolean/
|
||||
);
|
||||
assert.throws(
|
||||
() => sharp({ text: { text: 'text', wrap: 'invalid' } }),
|
||||
/Expected one of: word, char, wordChar, none for text\.wrap but received invalid of type string/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user