Skip to content

Commit

Permalink
test: fixed 'too small next chunk' test
Browse files Browse the repository at this point in the history
  • Loading branch information
vHeemstra authored Aug 12, 2024
1 parent ad57624 commit 64ff954
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ test('returns false on too small PNG', (t) => {
)
})

test('returns false on invalid chunk', (t) => {
test('returns false when next chunk size is too small', (t) => {
t.false(
isApng(
new Uint8Array([
Expand All @@ -152,6 +152,12 @@ test('returns false on invalid chunk', (t) => {
0x00, 0x00, 0x00, 0x04,
// Chunk type: any
0x00, 0x00, 0x00, 0x01,
// Chunk CRC
0x00, 0x00, 0x00, 0x00,
// Chunk length: 4
0x00, 0x00, 0x00, 0x04,
// Chunk type: any
0x00, 0x00, 0x00, 0x02,
// Chunk CRC omitted
]),
),
Expand Down

0 comments on commit 64ff954

Please sign in to comment.