-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallaby.js
61 lines (53 loc) · 1.31 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const wallabify = require('wallabify')
const path = require('path')
// import browserify for wallaby.
const wallabyPostprocessor = wallabify(
{
// browserify options, such as
// insertGlobals: false
}
// you may also pass an initializer function to chain other
// browserify options, such as transformers
// , b => b.exclude('mkdirp').transform(require('babelify'))
)
module.exports = function (wallaby) {
return {
files: [
{pattern: 'lib/**/*.js', load: false},
{pattern: 'test/helper.js', load: false}
],
tests: [
{pattern: 'test/**/*.test.js', load: false}
],
testFramework: 'mocha',
env: {
kind: 'electron',
params: {
env: 'NODE_ENV=test;NODE_PATH=' + path.join(wallaby.projectCacheDir, '../')
}
},
compilers: {
'**/*.js': wallaby.compilers.babel({
babelrc: true,
'presets': [
'babel-preset-power-assert'
],
'plugins': [
['module-resolver',
{
'root': ['./'],
'alias': {
'test': './test'
}
}
]
]
})
},
postprocessor: wallabyPostprocessor,
setup: function () {
// required to trigger tests loading
window.__moduleBundler.loadTests()
}
}
}