mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
* Revert "Revert "use a lazyily initialized stream for `node:crypto` `createHash` (#2652)"" This reverts commit613bb4822e. * Revert "Revert "implement `node:events` in javascript (#2604)"" This reverts commita4d0a1961a. * 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
14 lines
430 B
TypeScript
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);
|
|
});
|
|
});
|