-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
42 lines (33 loc) · 940 Bytes
/
wallaby.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var wallabyWebpack = require('wallaby-webpack');
var babel = require('babel');
module.exports = function (wallaby) {
var babelCompiler = wallaby.compilers.babel({
babel: babel,
// babel options
stage: 0
});
var webpackPostprocessor = wallabyWebpack({
// webpack options
resolve: {
extensions: ['', '.js', '.jsx']
}
});
return {
files: [
// you may just add the file separately,
// like done here https://github.com/wallabyjs/wallaby-react-todomvc-sample/blob/master/wallaby-babel.js
{pattern: 'node_modules/react-tools/src/test/phantomjs-shims.js', instrument: false},
{pattern: 'src/**/*.js*', load: false}
],
tests: [
{pattern: 'test/**/*.js*', load: false}
],
compilers: {
'**/*.js*': babelCompiler
},
postprocessor: webpackPostprocessor,
bootstrap: function () {
window.__moduleBundler.loadTests();
}
};
};