Skip to content

Commit

Permalink
remove ushort test
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Mar 20, 2024
1 parent 99e7113 commit 780ba3d
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/unit/avif.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,4 @@ describe('AVIF', () => {
() => sharp().avif({ bitdepth: 11 }),
/Error: Expected 8, 10 or 12 for bitdepth but received 11 of type number/);
});

it('should cast to ushort when bitdepth > 8', async () => {
const data = await sharp(inputJpg)
.resize(32)
.sharpen()
.avif({ effort: 0, bitdepth: 10 })
.toBuffer();
const { size, ...metadata } = await sharp(data)
.metadata();
assert.deepStrictEqual(metadata, {
channels: 3,
compression: 'av1',
depth: 'ushort',
format: 'heif',
hasAlpha: false,
hasProfile: false,
height: 26,
isProgressive: false,
pagePrimary: 0,
pages: 1,
space: 'srgb',
width: 32
});
});
});

0 comments on commit 780ba3d

Please sign in to comment.