aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-02-03 16:39:05 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-02-03 16:39:16 -0800
commit2758e0cab9286acbb14a6b4f6d367f078a7a7350 (patch)
tree1f607546a0112822a9e6a74ae0f597d6634f5599 /test
parent7d386bf1f1c7cbcf58b31fcc4c8e8d945483518e (diff)
downloadbun-2758e0cab9286acbb14a6b4f6d367f078a7a7350.tar.gz
bun-2758e0cab9286acbb14a6b4f6d367f078a7a7350.tar.zst
bun-2758e0cab9286acbb14a6b4f6d367f078a7a7350.zip
Add missing crypto export
Fixes #1984
Diffstat (limited to 'test')
-rw-r--r--test/bun.js/node-crypto.test.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bun.js/node-crypto.test.js b/test/bun.js/node-crypto.test.js
index 5d9d6a77d..f148f4fe9 100644
--- a/test/bun.js/node-crypto.test.js
+++ b/test/bun.js/node-crypto.test.js
@@ -21,3 +21,9 @@ it("crypto.createHmac", () => {
expect(result).toBe("bp7ym3X//Ft6uuUn1Y/a2y/kLnIZARl2kXNDBl9Y7Uo=");
});
+
+it("web crypto", async () => {
+ let bytes = new Uint8Array(32);
+ crypto.getRandomValues(bytes);
+ await crypto.subtle.digest("SHA-256", bytes);
+});