test: fix "crash cases" tests not failing properly (#37304)
* test: fix "crash cases" tests not failing properly * fixup! test: fix "crash cases" tests not failing properly
This commit is contained in:
parent
ea848bc1c5
commit
73b7aac6a4
2 changed files with 15 additions and 12 deletions
|
@ -62,10 +62,10 @@ describe('modules support', () => {
|
|||
|
||||
ifit(features.isRunAsNodeEnabled())('can be required in node binary', async function () {
|
||||
const child = childProcess.fork(path.join(fixtures, 'module', 'uv-dlopen.js'));
|
||||
await new Promise<void>(resolve => child.once('exit', (exitCode) => {
|
||||
expect(exitCode).to.equal(0);
|
||||
resolve();
|
||||
const exitCode = await new Promise<number | null>(resolve => child.once('exit', (exitCode) => {
|
||||
resolve(exitCode);
|
||||
}));
|
||||
expect(exitCode).to.equal(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue