Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: replace forEach() with for...of in test/parallel/test-util-log.js
  • Loading branch information
edodusi committed Nov 18, 2023
commit ddf9dbadec66dd3456b6c3502f186d01b2d8114f
4 changes: 2 additions & 2 deletions test/parallel/test-util-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const tests = [

// test util.log()
const re = /[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/;
tests.forEach(function(test) {
for (const test of tests) {
util.log(test.input);
const result = strings.shift().trim();
const match = re.exec(result);
assert.ok(match);
assert.strictEqual(match[1], test.output);
});
}

assert.strictEqual(process.stdout.writeTimes, tests.length);

Expand Down