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
|
@ -104,7 +104,7 @@ describe('node feature', () => {
|
|||
it('has the electron version in process.versions', async () => {
|
||||
const source = 'process.send(process.versions)';
|
||||
const forked = require('child_process').fork('--eval', [source]);
|
||||
const message = await new Promise(resolve => forked.once('message', resolve));
|
||||
const [message] = await emittedOnce(forked, 'message');
|
||||
expect(message)
|
||||
.to.have.own.property('electron')
|
||||
.that.is.a('string')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue