Skip to content

Commit 267a01f

Browse files
Trottcodebytere
authored andcommittedMar 17, 2020
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 <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>
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

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const bench = common.createBenchmark(main, {
1010
});
1111

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

1517
const str = ({

0 commit comments

Comments
 (0)
Please sign in to comment.