-
Notifications
You must be signed in to change notification settings - Fork 2
/
wallaby.js
64 lines (52 loc) · 1.54 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
58
59
60
61
62
63
64
var wallabyWebpack = require('wallaby-webpack');
module.exports = function(wallaby) {
var webpackPostprocessor = wallabyWebpack({
module: {
loaders: [
{
test: /.js?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}
]
},
node: {
fs: "empty"
}
});
return {
files: [
{pattern: 'node_modules/sinon/pkg/sinon.js', instrument: false},
{pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false},
{pattern: 'node_modules/phantomjs-polyfill/bind-polyfill.js', instrument: false},
{pattern: 'node_modules/react/umd/react.production.min.js', instrument: false},
{pattern: 'node_modules/chai/chai.js', instrument: false},
{pattern: 'javascript/src/**/*.js*', load: false},
{pattern: 'package.json', load: false},
{pattern: '!javascript/src/**/*-spec.js', load: false},
{pattern: 'javascript/test/**/*.js', load: false},
{pattern: '!javascript/test/**/*-specs.js', load: false}
],
tests: [
{pattern: 'javascript/src/**/*-spec.js', load: false},
{pattern: 'javascript/test/**/*-specs.js', load: false}
],
filesWithNoCoverageCalculated: ['javascript/src/parser/index.js'],
compilers: {
'**/*.js': wallaby.compilers.babel({
presets: ['es2015', 'react', 'stage-0'],
babel: require('babel-core')
})
},
postprocessor: webpackPostprocessor,
testFramework: 'mocha',
setup: function() {
window.expect = chai.expect;
var should = chai.should();
window.__moduleBundler.loadTests();
}
};
};