From b30484d3a9a8d9fc000376c8daa35dc515b6f847 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 6 Jun 2019 17:12:22 -0700 Subject: [PATCH] ci: allow use of .only in ci testing mode (#18678) --- spec-main/index.js | 2 +- spec/static/index.html | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/spec-main/index.js b/spec-main/index.js index f9f10dc06865..115174ceb351 100644 --- a/spec-main/index.js +++ b/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) }) }) diff --git a/spec/static/index.html b/spec/static/index.html index dafb81e4e75e..6f82f7267bee 100644 --- a/spec/static/index.html +++ b/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) }) })