diff --git a/test/parallel/test-runner-reporters.js b/test/parallel/test-runner-reporters.js index 74cae3401e2843..b649fe529629f2 100644 --- a/test/parallel/test-runner-reporters.js +++ b/test/parallel/test-runner-reporters.js @@ -89,7 +89,9 @@ describe('node:test reporters', { concurrency: true }, () => { ['--test', '--test-reporter', fixtures.path('test-runner/custom_reporters/', filename), testFile]); assert.strictEqual(child.stderr.toString(), ''); - assert.strictEqual(child.stdout.toString(), `${filename} {"test:start":5,"test:pass":2,"test:fail":3,"test:plan":3,"test:diagnostic":7}`); + const stdout = child.stdout.toString(); + assert.match(stdout, /{"test:start":5,"test:pass":2,"test:fail":3,"test:plan":3,"test:diagnostic":\d+}$/); + assert.strictEqual(stdout.slice(0, filename.length + 2), `${filename} {`); }); }); });