Log/exit when only called in specs on CI
This commit is contained in:
parent
50f5025447
commit
55a4e2589b
1 changed files with 12 additions and 0 deletions
|
@ -50,6 +50,18 @@
|
||||||
var Mocha = require('mocha');
|
var Mocha = require('mocha');
|
||||||
|
|
||||||
var mocha = new 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');
|
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
|
||||||
|
|
||||||
var query = Mocha.utils.parseQuery(window.location.search || '');
|
var query = Mocha.utils.parseQuery(window.location.search || '');
|
||||||
|
|
Loading…
Reference in a new issue