Merge pull request #5975 from electron/disable-only-specs-on-ci

Log and exit when calling only in specs on CI
This commit is contained in:
Cheng Zhao
2016-06-10 12:11:31 +00:00
committed by GitHub

View File

@@ -50,6 +50,18 @@
var Mocha = require('mocha');
var mocha = new Mocha();
if (isCi) {
mocha.grep = function () {
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)
}
}
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
var query = Mocha.utils.parseQuery(window.location.search || '');