From 6e978f7d73d9c80da88f0d69739239b59d768b89 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 15 Jan 2020 16:34:38 -0800 Subject: [PATCH] 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 Reviewed-By: Sam Roberts Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- benchmark/misc/getstringwidth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmark/misc/getstringwidth.js b/benchmark/misc/getstringwidth.js index 12f071c60dd7eb..97532bf2a7b50f 100644 --- a/benchmark/misc/getstringwidth.js +++ b/benchmark/misc/getstringwidth.js @@ -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 = ({