Add a spec for this behavior on Windows.

This commit is contained in:
Charlie Hess 2017-01-26 12:24:33 -08:00 committed by Kevin Sawicki
parent 26d4a3b0ba
commit 4fce00148d

View file

@ -349,6 +349,27 @@ describe('app module', function () {
restoreState: false 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 () { describe('isAccessibilitySupportEnabled API', function () {