forked from JetBrains/ring-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.config.js
50 lines (39 loc) · 1.22 KB
/
wallaby.config.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
const path = require('path');
const wallabyWebpack = require('wallaby-webpack');
const webpackConfig = require('./webpack.config');
const webpackTestConfig = require('./webpack-test.config');
module.exports = wallaby => {
webpackConfig.componentsPath.
push(path.join(wallaby.projectCacheDir, 'components'));
webpackTestConfig.entryPatterns = [
'test-helpers/mocha-globals.js',
'test-helpers/enzyme-configuration.js',
'components/**/*.test.js'
];
return {
files: [
{pattern: 'components/**/*.*', load: false},
{pattern: 'test-helpers/**/*.js', load: false},
{pattern: 'postcss.config.js', instrument: false, load: false},
{pattern: 'components/**/*.test.js', ignore: true}
],
tests: [
{pattern: 'components/**/*.test.js', load: false}
],
testFramework: 'mocha',
compilers: {
'**/*.js': wallaby.compilers.babel(
JSON.parse(require('fs').readFileSync('.babelrc'))
)
},
postprocessor: wallabyWebpack(webpackTestConfig),
bootstrap: function bootstrap() {
// required to trigger tests loading
window.__moduleBundler.loadTests();
},
env: {
kind: 'electron'
},
reportConsoleErrorAsError: true
};
};