Files
bun.sh/test/js/node/crypto/crypto-lazyhash.test.ts
dave caruso 2c1694f63b Fix streams breaking on reverted EventEmitter / Make Discord.js work (#2913)
* Revert "Revert "use a lazyily initialized stream for `node:crypto` `createHash` (#2652)""

This reverts commit 613bb4822e.

* Revert "Revert "implement `node:events` in javascript (#2604)""

This reverts commit a4d0a1961a.

* oops

* fix entrypoints stuff

* fix hash copy

* use native events for node streams and crypto

* requested changes

* oops

* make discord.js work

* fix webkit hash

* headers tojson
2023-06-01 14:31:36 -07:00

14 lines
430 B
TypeScript

import { describe, expect, test } from "bun:test";
import { Hash, createHash } from "crypto";
import { Transform } from "stream";
describe("LazyHash quirks", () => {
test("hash instanceof Transform", () => {
const hash = createHash("sha256");
expect(hash instanceof Transform).toBe(true);
});
test("Hash.prototype instanceof Transform", () => {
expect(Hash.prototype instanceof Transform).toBe(true);
});
});