fix: support async child process methods without callback in asar (#15927)
* fix: support async child process methods without callback in asar * fix: support async child process methods without callback in asar (improved)
This commit is contained in:
parent
6c998aa4f2
commit
dc93d94bc8
2 changed files with 19 additions and 3 deletions
|
@ -912,6 +912,18 @@ describe('asar package', function () {
|
|||
})
|
||||
})
|
||||
|
||||
it('executes binaries without callback', function (done) {
|
||||
const process = execFile(echo, ['test'])
|
||||
process.on('close', function (code) {
|
||||
assert.strictEqual(code, 0)
|
||||
done()
|
||||
})
|
||||
process.on('error', function () {
|
||||
assert.fail()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('execFileSync executes binaries', function () {
|
||||
const output = execFileSync(echo, ['test'])
|
||||
assert.strictEqual(String(output), 'test\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue