diff options
Diffstat (limited to 'test/js/node/crypto/node-crypto.test.js')
-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"); |