From 26a54295062203604fffa7d0e69f50ca6bcdd945 Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Sat, 2 Jul 2022 04:28:18 +0800 Subject: [PATCH] squash: remove redundant Buffer.from() --- test/parallel/test-webcrypto-random.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }