diff options
author | 2022-03-28 20:43:53 -0700 | |
---|---|---|
committer | 2022-03-28 20:43:53 -0700 | |
commit | 88ea61cfca8572b2d2872cb2f1f81dd53b58e594 (patch) | |
tree | 2a0dc42297bf3ee07965d8f38bf3d570c7c433a5 /integration/bunjs-only-snippets | |
parent | 2e4b5f3037b4c3acb0a41daf04d9b7ca5b1a8d80 (diff) | |
download | bun-88ea61cfca8572b2d2872cb2f1f81dd53b58e594.tar.gz bun-88ea61cfca8572b2d2872cb2f1f81dd53b58e594.tar.zst bun-88ea61cfca8572b2d2872cb2f1f81dd53b58e594.zip |
[bun.js] Add `Bun.hash`
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r-- | integration/bunjs-only-snippets/hash.test.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/hash.test.js b/integration/bunjs-only-snippets/hash.test.js new file mode 100644 index 000000000..c907002cc --- /dev/null +++ b/integration/bunjs-only-snippets/hash.test.js @@ -0,0 +1,28 @@ +import fs from "fs"; +import { it, expect } from "bun:test"; +import path from "path"; + +it(`Bun.hash()`, () => { + console.log(Bun.hash("hello world")); +}); +it(`Bun.hash.wyhash()`, () => { + console.log(Bun.hash.wyhash("hello world")); +}); +it(`Bun.hash.adler32()`, () => { + console.log(Bun.hash.adler32("hello world")); +}); +it(`Bun.hash.crc32()`, () => { + console.log(Bun.hash.crc32("hello world")); +}); +it(`Bun.hash.cityHash32()`, () => { + console.log(Bun.hash.cityHash32("hello world")); +}); +it(`Bun.hash.cityHash64()`, () => { + console.log(Bun.hash.cityHash64("hello world")); +}); +it(`Bun.hash.murmur32v3()`, () => { + console.log(Bun.hash.murmur32v3("hello world")); +}); +it(`Bun.hash.murmur64v2()`, () => { + console.log(Bun.hash.murmur64v2("hello world")); +}); |