feat: add support for --no-experimental-global-navigator (#47418)

chore: add support for --no-experimental-global-navigator

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
trop[bot] 2025-06-23 12:21:38 +02:00 committed by GitHub
commit cfa2efe0c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 0 deletions

View file

@ -800,5 +800,33 @@ describe('utilityProcess module', () => {
expect(stat.size).to.be.greaterThan(0);
await fs.rm(tmpDir, { recursive: true });
});
it('supports --no-experimental-global-navigator flag', async () => {
{
const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
stdio: 'ignore'
});
await once(child, 'spawn');
const [data] = await once(child, 'message');
expect(data).to.be.true();
const exit = once(child, 'exit');
expect(child.kill()).to.be.true();
await exit;
}
{
const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
stdio: 'ignore',
execArgv: [
'--no-experimental-global-navigator'
]
});
await once(child, 'spawn');
const [data] = await once(child, 'message');
expect(data).to.be.false();
const exit = once(child, 'exit');
expect(child.kill()).to.be.true();
await exit;
}
});
});
});