Skip to content

Commit

Permalink
benchmark: fix getStringWidth() benchmark
Browse files Browse the repository at this point in the history
8fb5fe2 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: nodejs#31476
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Trott committed Jan 23, 2020
1 parent ab6ab9c commit 085a5c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/misc/getstringwidth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 085a5c7

Please sign in to comment.