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: #31476
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Mar 15, 2020
1 parent 8c3e6d0 commit ec06d00
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 ec06d00

Please sign in to comment.