Browse Source

build: only retry tests on CI (#37167)

Samuel Attard 2 years ago
parent
commit
00a542358d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      spec/index.js

+ 3 - 1
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;
   }