summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJithil P Ponnan <MrJithil@users.noreply.github.com>2023-05-13 18:40:42 +1000
committerGitHub <noreply@github.com>2023-05-13 08:40:42 +0000
commite74b84e458e40b8d95b495bad5ede7766820725f (patch)
treeb5fc978d3624edd4eb4c59584adfc4914c64d382
parent2dd6d76c898c930d0f7d9386bde4b6dec37b7a49 (diff)
downloadnode-new-e74b84e458e40b8d95b495bad5ede7766820725f.tar.gz
test: add getRandomValues return length
PR-URL: https://github.com/nodejs/node/pull/46357 Reviewed-By: Filip Skokan <panva.ip@gmail.com>
-rw-r--r--test/parallel/test-webcrypto-random.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parallel/test-webcrypto-random.js b/test/parallel/test-webcrypto-random.js
index 31d4884d1f..c83a0964bc 100644
--- a/test/parallel/test-webcrypto-random.js
+++ b/test/parallel/test-webcrypto-random.js
@@ -69,3 +69,8 @@ for (const ctor of intTypedConstructors) {
);
}
}
+
+{
+ const typedArray = new Uint8Array(32);
+ assert.strictEqual(crypto.getRandomValues(typedArray), typedArray);
+}