fix test typing

This commit is contained in:
Will Scullin 2021-02-07 21:54:11 -08:00
parent 279f770e28
commit 8ddb17202b
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD
1 changed files with 10 additions and 2 deletions

View File

@ -3,13 +3,21 @@ import { compareSequences } from './util';
describe('compareSequences', () => {
it('matches at pos 0', () => {
expect(
compareSequences([0x01, 0x02, 0x03], [0x01, 0x02, 0x03], 0)
compareSequences(
new Uint8Array([0x01, 0x02, 0x03]),
[0x01, 0x02, 0x03],
0
)
).toBeTruthy();
});
it('matches at pos 1', () => {
expect(
compareSequences([0x00, 0x01, 0x02, 0x03], [0x01, 0x02, 0x03], 1)
compareSequences(
new Uint8Array([0x00, 0x01, 0x02, 0x03]),
[0x01, 0x02, 0x03],
1
)
).toBeTruthy();
});
});