mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
benchmark: add default type in getstringwidth.js
This fixes a benchmark test that was recently broken by a breaking change on the master branch. Fixes: https://github.com/nodejs/node/issues/31372 PR-URL: https://github.com/nodejs/node/pull/31377 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
parent
fc4e413554
commit
d2683ede83
|
|
@ -10,6 +10,8 @@ const bench = common.createBenchmark(main, {
|
|||
});
|
||||
|
||||
function main({ n, type }) {
|
||||
// Default value for testing purposes.
|
||||
type = type || 'ascii';
|
||||
const { getStringWidth } = require('internal/readline/utils');
|
||||
|
||||
const str = ({
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user