forked from QbDVision-Inc/chimpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
46 lines (38 loc) · 984 Bytes
/
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
module.exports = function (wallaby) {
var fs = require('fs');
var path = require('path');
var babel = require('babel-core');
var babelConfig = JSON.parse(
fs.readFileSync(path.join(__dirname, '.babelrc'))
);
babelConfig.babel = babel;
return {
files: [
'src/bin/*.js',
'src/lib/**/*.js',
'src/__mocks__/*.js'
],
tests: [
'src/__tests__/*.js'
],
compilers: {
'**/*.js': wallaby.compilers.babel(babelConfig)
},
env: {
type: 'node',
params: {
runner: '--harmony'
}
},
testFramework: 'jest',
bootstrap: function (wallaby) {
var path = require('path');
var packageConfigPath = path.resolve(wallaby.localProjectDir, 'package.json');
var packageConfig = require(packageConfigPath);
var jestConfig = packageConfig.jest;
delete jestConfig.scriptPreprocessor;
wallaby.testFramework.configure(jestConfig);
},
debug: true
};
};