Add a spec for this behavior on Windows.
This commit is contained in:
parent
26d4a3b0ba
commit
4fce00148d
1 changed files with 21 additions and 0 deletions
|
@ -349,6 +349,27 @@ describe('app module', function () {
|
|||
restoreState: false
|
||||
})
|
||||
})
|
||||
|
||||
it('allows you to pass a custom executable and arguments', () => {
|
||||
if (process.platform !== 'win32') return
|
||||
|
||||
const appFolder = path.dirname(process.execPath)
|
||||
const updateExe = path.resolve(appFolder, '..', 'Update.exe')
|
||||
const exeName = path.basename(process.execPath)
|
||||
|
||||
app.setLoginItemSettings({openAtLogin: true}, updateExe, [
|
||||
'--processStart', `"${exeName}"`,
|
||||
'--process-start-args', `"--hidden"`
|
||||
])
|
||||
|
||||
assert.deepEqual(app.getLoginItemSettings(), {
|
||||
openAtLogin: true,
|
||||
openAsHidden: false,
|
||||
wasOpenedAtLogin: false,
|
||||
wasOpenedAsHidden: false,
|
||||
restoreState: false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('isAccessibilitySupportEnabled API', function () {
|
||||
|
|
Loading…
Reference in a new issue