Skip to content

Commit

Permalink
benchmark: add default type in getstringwidth.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trott authored and MylesBorins committed Jan 16, 2020
1 parent ea27e16 commit 6e978f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmark/misc/getstringwidth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down

0 comments on commit 6e978f7

Please sign in to comment.