-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwallaby.js
47 lines (42 loc) · 1.23 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
var wallabyWebpack = require('wallaby-webpack')
var webpack = require('webpack')
module.exports = function (wallaby) {
var webpackPostprocessor = wallabyWebpack({
plugins: [
new webpack.NormalModuleReplacementPlugin(/\.(gif|png|scss|css|jpg)$/, 'node-noop')
],
externals: {
'react/addons': true,
'jsdom': 'window',
'cheerio': 'window',
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window',
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [
wallaby.projectCacheDir + '/src',
'node_modules',
]
},
}
);
return {
files: [
{pattern: 'node_modules/react/dist/react-with-addons.js', instrument: false},
{pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false},
{pattern: 'src/client/**/*js*', load: false},
{pattern: 'src/client/**/*.test.js*', ignore: true},
],
tests: [
{pattern: 'src/client/**/*.test.js*', load: false}
],
compilers: {
'src/**/*.js*': wallaby.compilers.babel()
},
postprocessor: webpackPostprocessor,
setup: function () {
window.__moduleBundler.loadTests();
}
};
};