fix: use Node's microtasks policy in node_main.cc (#23153)
Fixes #21515.
This commit is contained in:
parent
3ada079fe3
commit
07654c47ec
3 changed files with 40 additions and 0 deletions
|
@ -307,4 +307,17 @@ describe('node feature', () => {
|
|||
const result = childProcess.spawnSync(process.execPath, [path.resolve(fixtures, 'api', 'electron-main-module', 'app.asar')]);
|
||||
expect(result.status).to.equal(0);
|
||||
});
|
||||
|
||||
it('handles Promise timeouts correctly', (done) => {
|
||||
const scriptPath = path.join(fixtures, 'module', 'node-promise-timer.js');
|
||||
const child = childProcess.spawn(process.execPath, [scriptPath], {
|
||||
env: { ELECTRON_RUN_AS_NODE: 'true' }
|
||||
});
|
||||
emittedOnce(child, 'exit').then(([code, signal]) => {
|
||||
expect(code).to.equal(0);
|
||||
expect(signal).to.equal(null);
|
||||
child.kill();
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue