test: use async helpers to simplify tests (#37314)
test: use async helpers to simplify the tests Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
0de1012280
commit
ee87438d28
9 changed files with 22 additions and 21 deletions
|
@ -62,9 +62,7 @@ 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'));
|
||||
const exitCode = await new Promise<number | null>(resolve => child.once('exit', (exitCode) => {
|
||||
resolve(exitCode);
|
||||
}));
|
||||
const [exitCode] = await emittedOnce(child, 'exit');
|
||||
expect(exitCode).to.equal(0);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue