-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallaby.js
45 lines (38 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
module.exports = function(w) {
return {
// runAllTestsInAffectedTestFile: true,
files: [
'src/**/*.ts',
{ "pattern": "env.yml", "instrument": false },
{ "pattern": "test/testing/helpers.ts", "instrument": false },
{ "pattern": "test/testing/test-console.ts", "instrument": false },
],
tests: [
'test/**/*-spec.ts'
],
env: {
type: 'node',
runner: 'node',
},
compilers: {
'**/*.ts': w.compilers.typeScript({ module: 'commonjs' })
},
setup() {
if (!process.env.AWS_STAGE) {
process.env.AWS_STAGE = 'test';
}
if (!console._restored) {
console.log('console.log stream returned to normal for test purposes');
console.log = function () {
return require('console').Console.prototype.log.apply(this, arguments);
}
console.error = function () {
return require('console').Console.prototype.error.apply(this, arguments);
}
console._restored = true;
}
},
testFramework: 'mocha',
debug: true
}
}