From b29badad8143fa3058e1718d68c03b8ba20ca099 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 23 Jan 2020 06:30:01 -0800 Subject: [PATCH] benchmark: fix getStringWidth() benchmark 8fb5fe28a45cc884567cd39e3b2f6b4272917af broke the benchmark for getStringWidth(). This fixes it up by updating the argument to `require()` to retrieve `getStringWidth()` from the new internal module location. PR-URL: https://github.com/nodejs/node/pull/31476 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig --- benchmark/misc/getstringwidth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/misc/getstringwidth.js b/benchmark/misc/getstringwidth.js index 97532bf2a7b50f..c10f7af8483cf9 100644 --- a/benchmark/misc/getstringwidth.js +++ b/benchmark/misc/getstringwidth.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { function main({ n, type }) { // Default value for testing purposes. type = type || 'ascii'; - const { getStringWidth } = require('internal/readline/utils'); + const { getStringWidth } = require('internal/util/inspect'); const str = ({ ascii: 'foobar'.repeat(100),