mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Ensure all WebP tests wait until Promises resolve
This commit is contained in:
parent
76ded7fd28
commit
ba4ce75377
@ -81,15 +81,15 @@ describe('WebP', function () {
|
||||
.resize(320, 240)
|
||||
.webp({ smartSubsample: false })
|
||||
.toBuffer()
|
||||
.then(withoutSmartSubsample => {
|
||||
.then(withoutSmartSubsample =>
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.webp({ smartSubsample: true })
|
||||
.toBuffer()
|
||||
.then(withSmartSubsample => {
|
||||
assert.strictEqual(true, withSmartSubsample.length > withoutSmartSubsample.length);
|
||||
});
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
it('invalid smartSubsample throws', () => {
|
||||
@ -103,15 +103,15 @@ describe('WebP', function () {
|
||||
.resize(320, 240)
|
||||
.webp()
|
||||
.toBuffer()
|
||||
.then(reductionEffort4 => {
|
||||
.then(reductionEffort4 =>
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.webp({ reductionEffort: 6 })
|
||||
.toBuffer()
|
||||
.then(reductionEffort6 => {
|
||||
assert.strictEqual(true, reductionEffort4.length > reductionEffort6.length);
|
||||
});
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
it('invalid reductionEffort throws', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user