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 codebytere committed Mar 14, 2020
1 parent 9a6ae09 commit c7c0dfe
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 c7c0dfe

Please sign in to comment.