diff --git a/test/parallel/test-webcrypto-random.js b/test/parallel/test-webcrypto-random.js index 1fe07123e542b9..73089fe7b49094 100644 --- a/test/parallel/test-webcrypto-random.js +++ b/test/parallel/test-webcrypto-random.js @@ -48,9 +48,9 @@ for (const ctor of intTypedConstructors) { { const buf = Buffer.alloc(10); - const before = Buffer.from(buf).toString('hex'); + const before = buf.toString('hex'); webcrypto.getRandomValues(buf); - const after = Buffer.from(buf).toString('hex'); + const after = buf.toString('hex'); assert.notStrictEqual(before, after); }