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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Trott authored and codebytere committed Feb 17, 2020
1 parent 03aac4e commit b29bada
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 b29bada

Please sign in to comment.