diff options
author | Moshe Atlow <moshe@atlow.co.il> | 2022-12-22 03:17:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-22 01:17:25 +0000 |
commit | 71951a0e86da9253d7c422fa2520ee9143e557fa (patch) | |
tree | 8b3200908575a13f67cef2feaea3a1fbab1c4a3b /test/parallel/test-runner-reporters.js | |
parent | 1773b2ada4b2b5ce9ad9f526808360fd5faf0282 (diff) | |
download | node-new-71951a0e86da9253d7c422fa2520ee9143e557fa.tar.gz |
test: fix flakyness in test-runner reporter test
PR-URL: https://github.com/nodejs/node/pull/45930
Fixes: https://github.com/nodejs/node/issues/45929
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'test/parallel/test-runner-reporters.js')
-rw-r--r-- | test/parallel/test-runner-reporters.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-runner-reporters.js b/test/parallel/test-runner-reporters.js index 74cae3401e..b649fe5296 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} {`); }); }); }); |