diff --git a/test/parallel/test-runner-reporters.js b/test/parallel/test-runner-reporters.js index 946a55d13919dd..602c98bc31bdea 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.fileURL('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} {`); }); });