diff options
author | 2023-06-13 07:29:02 -0700 | |
---|---|---|
committer | 2023-06-13 07:29:02 -0700 | |
commit | b93bdbb124fc7b1b4a09d414158e0107e8d66b92 (patch) | |
tree | 8b2e8b836b857d9a89f6080a312ba265b8047a6b | |
parent | c8d06f04d3f0eb783f8f315654a23eff5654015e (diff) | |
download | bun-b93bdbb124fc7b1b4a09d414158e0107e8d66b92.tar.gz bun-b93bdbb124fc7b1b4a09d414158e0107e8d66b92.tar.zst bun-b93bdbb124fc7b1b4a09d414158e0107e8d66b92.zip |
Add test
-rw-r--r-- | test/js/node/crypto/node-crypto.test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/js/node/crypto/node-crypto.test.js b/test/js/node/crypto/node-crypto.test.js index 7811d6607..9e0e7f396 100644 --- a/test/js/node/crypto/node-crypto.test.js +++ b/test/js/node/crypto/node-crypto.test.js @@ -16,6 +16,12 @@ describe("createHash", () => { expect(hash.digest("hex")).toBe("6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50"); }); + it("returns Buffer", () => { + const hash = crypto.createHash("sha256"); + hash.update("some data to hash"); + expect(Buffer.isBuffer(hash.digest())).toBeTrue(); + }); + it("stream (sync)", () => { const hash = crypto.createHash("sha256"); hash.write("some data to hash"); |