-
Notifications
You must be signed in to change notification settings - Fork 1
/
wallaby.js
57 lines (47 loc) · 1.59 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var wallabyWebpack = require('wallaby-webpack');
module.exports = function (wallaby) {
var webpackPostprocessor = wallabyWebpack({
externals: {
"react": "React"
},
module: {
loaders: [
{
test: /.js?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}
]
}
});
return {
files: [
{pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false},
{pattern: 'node_modules/phantomjs-polyfill/bind-polyfill.js', instrument: false},
{pattern: 'node_modules/react/dist/react-with-addons.js', instrument: false},
{pattern: 'node_modules/chai/chai.js', instrument: false},
{pattern: 'src/**/*.js', load: false},
{pattern: 'test/**/*.js', load: false},
{pattern: '!test/**/*-specs.js', load: false}
],
tests: [
{pattern: 'test/**/*-specs.js', load: false}
],
compilers: {
'**/*.js*': wallaby.compilers.babel({
presets: ['es2015', 'react', 'stage-0'],
babel: require('babel-core')
})
},
postprocessor: webpackPostprocessor,
testFramework: "mocha",
bootstrap: function () {
window.expect = chai.expect;
var should = chai.should();
window.__moduleBundler.loadTests();
}
};
};