mirror of
https://github.com/lovell/sharp.git
synced 2025-07-11 19:40:14 +02:00
Tests: only need to assert 'mean' of 16-bit PNG roundtrip
This commit is contained in:
parent
afab0d34dd
commit
549219f32a
@ -117,11 +117,15 @@ describe('PNG', function () {
|
||||
.toColourspace('grey16')
|
||||
.toBuffer();
|
||||
|
||||
const [statsBefore, statsAfter] = await Promise.all([
|
||||
sharp(fixtures.inputPng16BitGreyAlpha).stats(),
|
||||
sharp(after).stats()
|
||||
]);
|
||||
assert.deepStrictEqual(statsAfter.channels[1], statsBefore.channels[1]);
|
||||
const [alphaMeanBefore, alphaMeanAfter] = (
|
||||
await Promise.all([
|
||||
sharp(fixtures.inputPng16BitGreyAlpha).stats(),
|
||||
sharp(after).stats()
|
||||
])
|
||||
)
|
||||
.map(stats => stats.channels[1].mean);
|
||||
|
||||
assert.strictEqual(alphaMeanAfter, alphaMeanBefore);
|
||||
});
|
||||
|
||||
it('Valid PNG libimagequant palette value does not throw error', function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user