Skip to content

Commit 267a01f

Browse files
Trottcodebytere
authored andcommitted
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: #31372 PR-URL: #31377 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 77e6700 commit 267a01f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎benchmark/misc/getstringwidth.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const bench = common.createBenchmark(main,{
1010
});
1111

1212
functionmain({ n, type }){
13+
// Default value for testing purposes.
14+
type=type||'ascii';
1315
const{ getStringWidth }=require('internal/readline/utils');
1416

1517
conststr=({

0 commit comments

Comments
(0)