mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add a spec for this behavior on Windows.
This commit is contained in:
committed by
Kevin Sawicki
parent
26d4a3b0ba
commit
4fce00148d
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user