aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/crypto/crypto-lazyhash.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/crypto/crypto-lazyhash.test.ts')
-rw-r--r--test/js/node/crypto/crypto-lazyhash.test.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/js/node/crypto/crypto-lazyhash.test.ts b/test/js/node/crypto/crypto-lazyhash.test.ts
new file mode 100644
index 000000000..78ac4daf7
--- /dev/null
+++ b/test/js/node/crypto/crypto-lazyhash.test.ts
@@ -0,0 +1,13 @@
+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);
+ });
+});