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:
parent
221f5ee3d6
commit
cfa2efe0c2
4 changed files with 35 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue