-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
47 lines (39 loc) · 868 Bytes
/
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
module.exports = (wallaby) => ({
bootstrap(wallaby) {
wallaby.testFramework.configure({
moduleNameMapper: {
'.*\.(css|less)$': require('path').resolve(wallaby.localProjectDir, 'node_modules/jest-css-modules')
},
});
},
debug: true,
env: {
type: 'node',
params: {
env: 'NODE_ENV="test"',
},
},
hints: {
ignoreCoverage: /istanbul ignore next/,
},
files: [
'tsconfig.json',
'src/**/*.ts?(x)',
'src/**/*.js?(x)',
],
preprocessors: {
'**/*.js?(x)': (file) => {
const babelCore = require('babel-core');
return babelCore.transform(file.content, {
filename: file.path,
presets: [ 'babel-preset-jest', ],
sourceMap: true,
});
},
},
testFramework: 'jest',
tests: [
'tests/**/*.test.ts',
'tests/**/*.test.ts?(x)',
],
});