forked from aurelia-ui-toolkits/aurelia-materialize-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
62 lines (51 loc) · 1.39 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
62
/* eslint-disable no-var, no-shadow, dot-notation */
var babel = require('babel');
module.exports = function(wallaby) {
return {
files: [
{pattern: 'jspm_packages/system.js', instrument: false},
{pattern: 'config.js', instrument: false},
{pattern: 'node_modules/phantomjs-polyfill/bind-polyfill.js', load: true},
{pattern: 'src/**/*.js', load: false}
],
tests: [
{pattern: 'test/unit/**/*.js', load: false}
],
compilers: {
'**/*.js': wallaby.compilers.babel({
babel: babel,
optional: [
'es7.decorators',
'es7.classProperties'
]
})
},
middleware: (app, express) => {
app.use('/jspm_packages', express.static(require('path').join(__dirname, 'jspm_packages')));
},
bootstrap: function(wallaby) {
var promises = [];
var i = 0;
var len = wallaby.tests.length;
wallaby.delayStart();
System.config({
paths: {
'*': '*.js'
}
});
for (; i < len; i++) {
promises.push(System['import'](wallaby.tests[i].replace(/\.js$/, '')));
}
System['import']('core-js')
.then(function() {
return System['import']('polymer/mutationobservers');
})
.then(function() {
Promise.all(promises).then(function() {
wallaby.start();
});
});
},
debug: false
};
};