fix: race condition in utilityProcess tests (#45955)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-03-10 14:49:29 -05:00 committed by GitHub
parent 0b24418ca7
commit 702fdac1c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -228,7 +228,6 @@ describe('utilityProcess module', () => {
const child = utilityProcess.fork(fixtureFile, [], {
stdio: 'pipe'
});
await once(child, 'spawn');
expect(child.stdout).to.not.be.null();
let log = '';
child.stdout!.on('data', (chunk) => {
@ -293,7 +292,6 @@ describe('utilityProcess module', () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'log.js'), [], {
stdio: 'pipe'
});
await once(child, 'spawn');
expect(child.stdout).to.not.be.null();
let log = '';
child.stdout!.on('data', (chunk) => {
@ -326,7 +324,6 @@ describe('utilityProcess module', () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'log.js'), [], {
stdio: ['ignore', 'pipe', 'pipe']
});
await once(child, 'spawn');
expect(child.stderr).to.not.be.null();
let log = '';
child.stderr!.on('data', (chunk) => {