From 88ea61cfca8572b2d2872cb2f1f81dd53b58e594 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 28 Mar 2022 20:43:53 -0700 Subject: [bun.js] Add `Bun.hash` --- integration/bunjs-only-snippets/hash.test.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 integration/bunjs-only-snippets/hash.test.js (limited to 'integration/bunjs-only-snippets') 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")); +}); -- cgit v1.2.3