diff --git a/test/parallel/test-util-log.js b/test/parallel/test-util-log.js index 854746290ec796..838828e50f32b0 100644 --- a/test/parallel/test-util-log.js +++ b/test/parallel/test-util-log.js @@ -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);