-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwallaby.conf.js
More file actions
56 lines (48 loc) · 1.42 KB
/
wallaby.conf.js
File metadata and controls
56 lines (48 loc) · 1.42 KB
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
/*globals __dirname */
'use strict';
var babel = require ('babel-core');
var fs = require ('fs');
var path = require ('path');
var babelConfig = JSON.parse (fs.readFileSync (path.join (__dirname, '.babelrc')));
babelConfig.babel = babel;
module.exports = function (wallaby) {
return {
files: [
{pattern: 'test/test-helper.js'},
// {pattern: 'src/store/**/*.js'},
{pattern: 'src/components/**/*.js'},
{pattern: 'src/themes/**/*.js'}
],
tests: [
{pattern: 'src/test/**/*.js'},
],
compilers: {
'**/*.js*': wallaby.compilers.babel (babelConfig)
},
debug: true,
env: {
type: 'node',
runner: 'node'
},
bootstrap: function () {
// See http://wallabyjs.com/docs/config/bootstrap.html
console.log ('Setup wallaby');
var sep = require ('path').sep;
// Remove react from the require.cache, or else some code might not get
// executed when editing the source code.
// See https://github.com/wallabyjs/public/issues/321
Object.keys (require.cache)
.forEach (function (k) {
if (k.indexOf (sep + 'react' + sep) > -1) {
delete require.cache[k];
}
});
// Include the test helper, which sets up the document and window objects
// as globals:
require ('./test/test-helper');
},
teardown: function () {
console.log ('Teardown wallaby');
}
};
};