From bb33c74c074dceb33fa1ced0413147260c53c8d9 Mon Sep 17 00:00:00 2001 From: Jithil P Ponnan Date: Sat, 13 May 2023 18:40:42 +1000 Subject: [PATCH] test: add getRandomValues return length PR-URL: https://github.com/nodejs/node/pull/46357 Reviewed-By: Filip Skokan --- test/parallel/test-webcrypto-random.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-webcrypto-random.js b/test/parallel/test-webcrypto-random.js index 31d4884d1f653f..c83a0964bc5805 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); +}