mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Log/exit when only called in specs on CI
This commit is contained in:
@@ -50,6 +50,18 @@
|
||||
var Mocha = require('mocha');
|
||||
|
||||
var mocha = new Mocha();
|
||||
|
||||
if (isCi) {
|
||||
mocha.grep = function () {
|
||||
try {
|
||||
throw new Error('it.only or describe.only was called')
|
||||
} 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 || '');
|
||||
|
||||
Reference in New Issue
Block a user