mirror of
https://github.com/lovell/sharp.git
synced 2025-07-12 03:50:13 +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')
|
.toColourspace('grey16')
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
|
|
||||||
const [statsBefore, statsAfter] = await Promise.all([
|
const [alphaMeanBefore, alphaMeanAfter] = (
|
||||||
sharp(fixtures.inputPng16BitGreyAlpha).stats(),
|
await Promise.all([
|
||||||
sharp(after).stats()
|
sharp(fixtures.inputPng16BitGreyAlpha).stats(),
|
||||||
]);
|
sharp(after).stats()
|
||||||
assert.deepStrictEqual(statsAfter.channels[1], statsBefore.channels[1]);
|
])
|
||||||
|
)
|
||||||
|
.map(stats => stats.channels[1].mean);
|
||||||
|
|
||||||
|
assert.strictEqual(alphaMeanAfter, alphaMeanBefore);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Valid PNG libimagequant palette value does not throw error', function () {
|
it('Valid PNG libimagequant palette value does not throw error', function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user