diff options
author | 2023-01-25 13:43:23 -0800 | |
---|---|---|
committer | 2023-01-25 13:43:23 -0800 | |
commit | b767f9a99a2b4b6bd8f54cb851bda6a2696587ce (patch) | |
tree | f8eb6672cbd2cdc4e099541896a276839693121b /test/bun.js/node-crypto.test.js | |
parent | f61ee1ed4284627a22780fe37afa00a84297276e (diff) | |
download | bun-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.js | 9 |
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="); +}); |