feat: added process.electron to get the electron version in forked process (#16450)
This commit is contained in:
parent
8da91523d0
commit
8af532ba98
2 changed files with 18 additions and 0 deletions
|
@ -111,6 +111,18 @@ describe('node feature', () => {
|
|||
})
|
||||
forked.send('hello')
|
||||
})
|
||||
|
||||
it('has the electron version in process.versions', (done) => {
|
||||
const source = 'process.send(process.versions)'
|
||||
const forked = ChildProcess.fork('--eval', [source])
|
||||
forked.on('message', (message) => {
|
||||
expect(message)
|
||||
.to.have.own.property('electron')
|
||||
.that.is.a('string')
|
||||
.and.matches(/^\d+\.\d+\.\d+(\S*)?$/)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('child_process.spawn', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue