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:
Rich Trott 2020-01-15 16:34:38 -08:00
parent fc4e413554
commit d2683ede83

View File

@ -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 = ({