-
Notifications
You must be signed in to change notification settings - Fork 11
/
wallaby.js
40 lines (35 loc) · 877 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
const path = require('path');
const fs = require('fs');
process.env.BABEL_ENV = 'test';
process.env.NODE_ENV = 'production';
module.exports = function (wallaby) {
process.env.NODE_PATH += path.delimiter +
path.join(wallaby.localProjectDir, 'src', 'node_modules');
const babelConfig = JSON.parse(fs.readFileSync('.babelrc', 'utf8'));
babelConfig.babel = require('./node_modules/babel-core');
const babelCompiler = wallaby.compilers.babel(babelConfig);
return {
files: [
'src/**/*.js',
'!src/**/__tests__/**/*.js',
],
tests: [
'src/**/__tests__/**/*.js',
],
compilers: {
'**/*.js': babelCompiler,
},
env: {
type: 'node',
params: {
env: [
'NODE_ENV=production',
].join(';'),
},
},
debug: false,
testFramework: 'mocha',
setup: () => {
},
};
};