Browse Source

ci: allow use of .only in ci testing mode (#18678)

Shelley Vohr 5 years ago
parent
commit
b30484d3a9
2 changed files with 2 additions and 15 deletions
  1. 1 1
      spec-main/index.js
  2. 1 14
      spec/static/index.html

+ 1 - 1
spec-main/index.js

@@ -86,6 +86,6 @@ app.whenReady().then(() => {
         process.exit(runner.failures)
       })
     }
-    const runner = (isCI) ? mocha.forbidOnly().run(cb) : mocha.run(cb)
+    const runner = mocha.run(cb)
   })
 })

+ 1 - 14
spec/static/index.html

@@ -96,21 +96,8 @@
     const runner = mocha.run(() => {
       // Ensure the callback is called after runner is defined
       setTimeout(() => {
-        if (isCi && runner.hasOnly) {
-          try {
-            throw new Error('A spec contains a call to it.only or describe.only and should be reverted.')
-          } catch (error) {
-            console.error(error.stack || error)
-          }
-          ipcRenderer.send('process.exit', 1)
-          return
-        }
-
         Mocha.utils.highlightTags('code')
-
-        if (isCi) {
-          ipcRenderer.send('process.exit', runner.failures)
-        }
+        if (isCi) ipcRenderer.send('process.exit', runner.failures)
       }, 0)
     })
   })