aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/node-crypto.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-25 13:43:23 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-25 13:43:23 -0800
commitb767f9a99a2b4b6bd8f54cb851bda6a2696587ce (patch)
treef8eb6672cbd2cdc4e099541896a276839693121b /test/bun.js/node-crypto.test.js
parentf61ee1ed4284627a22780fe37afa00a84297276e (diff)
downloadbun-b767f9a99a2b4b6bd8f54cb851bda6a2696587ce.tar.gz
bun-b767f9a99a2b4b6bd8f54cb851bda6a2696587ce.tar.zst
bun-b767f9a99a2b4b6bd8f54cb851bda6a2696587ce.zip
Add a test
Diffstat (limited to 'test/bun.js/node-crypto.test.js')
-rw-r--r--test/bun.js/node-crypto.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bun.js/node-crypto.test.js b/test/bun.js/node-crypto.test.js
index 227368760..151a06198 100644
--- a/test/bun.js/node-crypto.test.js
+++ b/test/bun.js/node-crypto.test.js
@@ -15,3 +15,12 @@ it("crypto.createHash ", () => {
for (let i = 0; i < 10; i++) fn();
});
+
+it("crypto.createHmac", () => {
+ const result = crypto
+ .createHmac("sha256", "key")
+ .update("message")
+ .digest("base64");
+
+ expect(result).toBe("bp7ym3X//Ft6uuUn1Y/a2y/kLnIZARl2kXNDBl9Y7Uo=");
+});