diff options
author | 2022-03-30 18:57:34 -0700 | |
---|---|---|
committer | 2022-03-30 18:57:34 -0700 | |
commit | b3fa316c5e0f25e9cff1caac6d5c36d7cdf8939c (patch) | |
tree | e620e7e1dde9a8882f63b8dc2a32da5ba4f4fe6f /integration/bunjs-only-snippets | |
parent | b09a22aaf589afff2b01fbed2751ab537475ea4a (diff) | |
download | bun-b3fa316c5e0f25e9cff1caac6d5c36d7cdf8939c.tar.gz bun-b3fa316c5e0f25e9cff1caac6d5c36d7cdf8939c.tar.zst bun-b3fa316c5e0f25e9cff1caac6d5c36d7cdf8939c.zip |
Add test for Bun.hash that runs it with a Uint8Array
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r-- | integration/bunjs-only-snippets/hash.test.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/integration/bunjs-only-snippets/hash.test.js b/integration/bunjs-only-snippets/hash.test.js index c907002cc..71ad5a229 100644 --- a/integration/bunjs-only-snippets/hash.test.js +++ b/integration/bunjs-only-snippets/hash.test.js @@ -3,26 +3,34 @@ import { it, expect } from "bun:test"; import path from "path"; it(`Bun.hash()`, () => { - console.log(Bun.hash("hello world")); + Bun.hash("hello world"); + Bun.hash(new TextEncoder().encode("hello world")); }); it(`Bun.hash.wyhash()`, () => { - console.log(Bun.hash.wyhash("hello world")); + Bun.hash.wyhash("hello world"); + Bun.hash.wyhash(new TextEncoder().encode("hello world")); }); it(`Bun.hash.adler32()`, () => { - console.log(Bun.hash.adler32("hello world")); + Bun.hash.adler32("hello world"); + Bun.hash.adler32(new TextEncoder().encode("hello world")); }); it(`Bun.hash.crc32()`, () => { - console.log(Bun.hash.crc32("hello world")); + Bun.hash.crc32("hello world"); + Bun.hash.crc32(new TextEncoder().encode("hello world")); }); it(`Bun.hash.cityHash32()`, () => { - console.log(Bun.hash.cityHash32("hello world")); + Bun.hash.cityHash32("hello world"); + Bun.hash.cityHash32(new TextEncoder().encode("hello world")); }); it(`Bun.hash.cityHash64()`, () => { - console.log(Bun.hash.cityHash64("hello world")); + Bun.hash.cityHash64("hello world"); + Bun.hash.cityHash64(new TextEncoder().encode("hello world")); }); it(`Bun.hash.murmur32v3()`, () => { - console.log(Bun.hash.murmur32v3("hello world")); + Bun.hash.murmur32v3("hello world"); + Bun.hash.murmur32v3(new TextEncoder().encode("hello world")); }); it(`Bun.hash.murmur64v2()`, () => { - console.log(Bun.hash.murmur64v2("hello world")); + Bun.hash.murmur64v2("hello world"); + Bun.hash.murmur64v2(new TextEncoder().encode("hello world")); }); |