-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwallaby.js
36 lines (36 loc) · 1.02 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
const path = require('path');
module.exports = function(wallaby) {
return {
files: [
'tsconfig.json',
'src/**/*.ts',
{
pattern: 'src/**/*.spec.ts',
ignore: true
}
],
tests: ['src/**/*.spec.ts'],
env: {
type: 'node',
params: {
env: `NODE_ENV=testrun;STORAGE_BASE_DIR=${path.resolve('./src/storage')}`
}
},
setup: function(wallaby) {
if (global._tsconfigPathsRegistered) return;
const tsConfigPaths = require('tsconfig-paths');
const tsconfig = require('./tsconfig.json');
tsConfigPaths.register({
baseUrl: tsconfig.compilerOptions.baseUrl,
paths: tsconfig.compilerOptions.paths
});
global._tsconfigPathsRegistered = true;
},
// or any other supported testing framework:
// https://wallabyjs.com/docs/integration/overview.html#supported-testing-frameworks
testFramework: 'mocha',
compilers: {
'src/**/*.ts': wallaby.compilers.typeScript({module: 'commonjs'})
}
};
};