Skip to content

Commit 6580f3f

Browse files
committed
fixup! benchmark: add validateStream to styleText bench
1 parent 23812f5 commit 6580f3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/util/style-text.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const common = require('../common.js');
44

55
const { styleText } = require('node:util');
6+
const assert = require('node:assert');
67

78
const bench = common.createBenchmark(main, {
89
messageType: ['string', 'number', 'boolean', 'invalid'],
@@ -30,9 +31,9 @@ function main({ messageType, format, validateStream, n }) {
3031

3132
bench.start();
3233
for (let i = 0; i < n; i++) {
33-
let colored = ''
34+
let colored = '';
3435
try {
35-
colored = util.styleText(format, str, { validateStream });
36+
colored = styleText(format, str, { validateStream });
3637
assert.ok(colored); // Attempt to avoid dead-code elimination
3738
} catch {
3839
// eslint-disable no-empty

0 commit comments

Comments
 (0)