benchmark: fix incorrect base64 input in byteLength benchmark

PR-URL: https://github.com/nodejs/node/pull/60841
Fixes: https://github.com/nodejs/node/issues/60836
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
This commit is contained in:
semimikoh
2025-12-03 16:19:16 +09:00
committed by GitHub
parent 80e0779a81
commit 470ef988f6

View File

@@ -22,7 +22,7 @@ const chars = {
function getInput(type, repeat, encoding) {
const original = (repeat === 1) ? chars[type] : chars[type].repeat(repeat);
if (encoding === 'base64') {
Buffer.from(original, 'utf8').toString('base64');
return Buffer.from(original, 'utf8').toString('base64');
}
return original;
}