test: add test for second-instance event parameter (#16798)
* test: add test for second-instance event parameter * robustify getting data from child process * fix test on windows * fix lint * Update api-app-spec.js * fix package-lock.json
This commit is contained in:
parent
48a95f9677
commit
ea6a926494
3 changed files with 34 additions and 2 deletions
7
spec/fixtures/api/singleton/main.js
vendored
7
spec/fixtures/api/singleton/main.js
vendored
|
@ -6,8 +6,11 @@ app.once('ready', () => {
|
|||
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
|
||||
app.on('second-instance', () => {
|
||||
setImmediate(() => app.exit(0))
|
||||
app.on('second-instance', (event, args) => {
|
||||
setImmediate(() => {
|
||||
console.log(JSON.stringify(args))
|
||||
app.exit(0)
|
||||
})
|
||||
})
|
||||
|
||||
if (!gotTheLock) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue