-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
48 lines (37 loc) · 1.07 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
module.exports = function (wallaby) {
return {
files: [
{ pattern: "jspm_packages/system.js", instrument: false },
{ pattern: "node_modules/es6-shim/es6-shim.js", instrument: false },
{ pattern: "system.config.js", instrument: false },
{ pattern: "src/**/*.ts", load: false },
{ pattern: "!src/**/*.spec.ts", load: false }
],
tests: [
{ pattern: "src/**/*.spec.ts", load: false }
],
middleware: (app, express) => {
app.use("/jspm_packages", express.static(require("path").join(__dirname, "jspm_packages")));
},
bootstrap: function (wallaby) {
wallaby.delayStart();
System.config({
paths: {
"*": "*"
}
});
var promises = [];
for (var i = 0, len = wallaby.tests.length; i < len; i++) {
promises.push(System["import"](wallaby.tests[i].replace(/\.js$/, "")));
}
// System.import("test/unit/setup")
// .then(function () {
// })
return Promise.all(promises)
.then(function () {
wallaby.start();
}).catch(function (e) { setTimeout(function () { throw e; }, 0); });
},
debug: false
};
};