diff options
author | 2023-07-10 21:14:37 -0300 | |
---|---|---|
committer | 2023-07-10 17:14:37 -0700 | |
commit | 4af4b508a1027ee837f69d4fed5a246629714398 (patch) | |
tree | 1e769ce87851d1416911f9c7a965b6f291a3affc /test | |
parent | ec1117031197dbce434473492c85bb2654a91248 (diff) | |
download | bun-4af4b508a1027ee837f69d4fed5a246629714398.tar.gz bun-4af4b508a1027ee837f69d4fed5a246629714398.tar.zst bun-4af4b508a1027ee837f69d4fed5a246629714398.zip |
feat(crypto) add getCurves (#3598)
* add getCurves
* add nodefallbacks
* update docs
* oops
Diffstat (limited to 'test')
-rw-r--r-- | test/js/node/crypto/crypto.test.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/js/node/crypto/crypto.test.ts b/test/js/node/crypto/crypto.test.ts index d8bfe5353..b1b8646f3 100644 --- a/test/js/node/crypto/crypto.test.ts +++ b/test/js/node/crypto/crypto.test.ts @@ -1,6 +1,6 @@ import { sha, MD5, MD4, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_256, gc, CryptoHasher } from "bun"; import { it, expect, describe } from "bun:test"; - +import crypto from "crypto"; const HashClasses = [MD5, MD4, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_256]; describe("CryptoHasher", () => { @@ -109,6 +109,13 @@ describe("CryptoHasher", () => { } }); +describe("crypto.getCurves", () => { + it("should return an array of strings", () => { + expect(Array.isArray(crypto.getCurves())).toBe(true); + expect(typeof crypto.getCurves()[0]).toBe("string"); + }); +}); + describe("crypto", () => { for (let Hash of HashClasses) { for (let [input, label] of [ |