From ca218b63958891e79c6aad28d559801e47dc53a5 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 10 Jan 2019 14:15:47 -0800 Subject: [PATCH] test: allow retries for flaky mas loginitem specs (#16347) --- spec/api-app-spec.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/spec/api-app-spec.js b/spec/api-app-spec.js index 133710e25162..05e118601906 100644 --- a/spec/api-app-spec.js +++ b/spec/api-app-spec.js @@ -528,7 +528,10 @@ 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)}"`, @@ -536,9 +539,7 @@ describe('app module', () => { ] before(function () { - if (process.platform === 'linux') { - this.skip() - } + if (process.platform === 'linux') this.skip() }) beforeEach(() => { @@ -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 })