From 00a542358dfd47139776677d33d7147e9c4aa567 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 7 Feb 2023 22:44:53 -0800 Subject: [PATCH] build: only retry tests on CI (#37167) --- spec/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/index.js b/spec/index.js index c591d1cbca27..e374a41708ef 100644 --- a/spec/index.js +++ b/spec/index.js @@ -50,9 +50,11 @@ app.whenReady().then(async () => { const Mocha = require('mocha'); const mochaOptions = { - retries: 3, forbidOnly: process.env.CI }; + if (process.env.CI) { + mochaOptions.retries = 3; + } if (process.env.MOCHA_REPORTER) { mochaOptions.reporter = process.env.MOCHA_REPORTER; }