mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user