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:
Alex Greenland 2018-12-18 07:27:39 +00:00 committed by Cheng Zhao
parent 6c998aa4f2
commit dc93d94bc8
2 changed files with 19 additions and 3 deletions

View file

@ -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')