From 64e8f234a46f150c1f473c60342a3527b6f1cf4a Mon Sep 17 00:00:00 2001 From: Jithil P Ponnan Date: Thu, 26 Jan 2023 14:46:00 +1100 Subject: [PATCH] test: add getRandomValues return length --- 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); +}