Skip to content

Commit

Permalink
test: allow retries for flaky mas loginitem specs (#16347)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 10, 2019
1 parent 52852b9 commit ca218b6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions spec/api-app-spec.js
Expand Up @@ -528,17 +528,18 @@ describe('app module', () => {
})
})

describe('app.get/setLoginItemSettings API', () => {
describe('app.get/setLoginItemSettings API', function () {
// allow up to three retries to account for flaky mas results
this.retries(3)

const updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe')
const processStartArgs = [
'--processStart', `"${path.basename(process.execPath)}"`,
'--process-start-args', `"--hidden"`
]

before(function () {
if (process.platform === 'linux') {
this.skip()
}
if (process.platform === 'linux') this.skip()
})

beforeEach(() => {
Expand Down Expand Up @@ -609,11 +610,7 @@ describe('app module', () => {
})

it('allows you to pass a custom executable and arguments', function () {
if (process.platform !== 'win32') {
// FIXME(alexeykuzmin): Skip the test.
// this.skip()
return
}
if (process.platform !== 'win32') this.skip()

app.setLoginItemSettings({ openAtLogin: true, path: updateExe, args: processStartArgs })

Expand Down

0 comments on commit ca218b6

Please sign in to comment.