kibana/tasks/config/simplemocha.js
spalger c87aec3dae [mocha] move setup work into module
with https://github.com/elastic/kibana/pull/5553 we added command line flags the told mocha it was supposed to use babel. This changes the strategy here and instead uses mocha's -r option (and it's mocha.opts file to specify it). This means that using mocha directly from the command line still works, and that we have a place where we can do other setup work.
2016-01-12 16:26:42 -07:00

26 lines
496 B
JavaScript

var wrap = require('lodash').wrap;
var Mocha = require('mocha');
Mocha.prototype.run = wrap(Mocha.prototype.run, function (orig) {
require('../../test/mocha_setup');
orig.call(this);
});
module.exports = {
options: {
timeout: 10000,
slow: 5000,
ignoreLeaks: false,
reporter: 'dot'
},
all: {
src: [
'test/**/__tests__/**/*.js',
'src/**/__tests__/**/*.js',
'test/fixtures/__tests__/*.js',
'!src/**/public/**',
'!src/ui/**'
]
}
};