Expose xxhashAsHex JS tests (#1640)
This commit is contained in:
@@ -10,21 +10,23 @@ describe('xxhashAsHex', (): void => {
|
||||
await waitReady();
|
||||
});
|
||||
|
||||
it('returns a 64-bit value by default', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc')
|
||||
).toEqual('0x990977adf52cbc44');
|
||||
});
|
||||
describe.each([false, true])('onlyJs=%p', (onlyJs): void => {
|
||||
it('returns a 64-bit value by default', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc', undefined, onlyJs)
|
||||
).toEqual('0x990977adf52cbc44');
|
||||
});
|
||||
|
||||
it('returns a 128-bit value (as specified)', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc', 128)
|
||||
).toEqual('0x990977adf52cbc440889329981caa9be');
|
||||
});
|
||||
it('returns a 128-bit value (as specified)', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc', 128, onlyJs)
|
||||
).toEqual('0x990977adf52cbc440889329981caa9be');
|
||||
});
|
||||
|
||||
it('returns a 256-bit value (as specified)', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc', 256)
|
||||
).toEqual('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b');
|
||||
it('returns a 256-bit value (as specified)', (): void => {
|
||||
expect(
|
||||
xxhashAsHex('abc', 256, onlyJs)
|
||||
).toEqual('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user