-
Notifications
You must be signed in to change notification settings - Fork 11
/
wallaby.conf.js
42 lines (40 loc) · 1.14 KB
/
wallaby.conf.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
const wallabyWebpack = require('wallaby-webpack'); // eslint-disable-line import/no-extraneous-dependencies
module.exports = function configureWallaby(wallaby) {
const webpackPostprocessor = wallabyWebpack({
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
sinon: 'sinon/pkg/sinon',
},
},
module: {
loaders: [
{ test: /\.html$/, loader: 'file-loader?name=[name].[ext]' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.s(a|c)ss$/, loader: 'style-loader!css-loader!sass-loader' },
],
},
});
return {
files: [
{ pattern: 'src/**/*.ts*', load: false },
{ pattern: 'src/**/*.scss*', load: false },
],
tests: [
{ pattern: 'test/**/*.spec.ts*', load: false },
],
compilers: {
'**/*.js*': wallaby.compilers.typeScript({
jsx: 'react',
}),
},
postprocessor: webpackPostprocessor,
bootstrap() {
window.__moduleBundler.loadTests(); // eslint-disable-line no-underscore-dangle
},
env: {
kind: 'electron',
},
};
};