-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallaby.js
42 lines (37 loc) · 953 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
// @ts-ignore
// eslint-disable-next-line no-undef
module.exports = function(wallaby) {
return {
files: [
'tsconfig.json',
'jest.config.js',
'src/**/*.ts?(x)',
'!src/**/*.test.ts?(x)',
'!src/**/*.spec.ts?(x)',
],
tests: ['src/**/*.spec.ts?(x)', 'src/**/*.test.ts?(x)'],
env: {
type: 'node',
runner: 'node',
},
testFramework: 'jest',
debug: true,
reportConsoleErrorAsError: true,
lowCoverageThreshold: 80,
filesWithNoCoverageCalculated: ['jest.config.js'],
compilers: {
'**/*.ts?(x)': wallaby.compilers.typeScript({ module: 'commonjs' }),
},
preprocessors: {
// @ts-ignore
'**/*.js?(x)': file =>
require('@babel/core').transform(file.content, {
// @ts-ignore
sourceMap: true,
filename: file.path,
// @ts-ignore
presets: [require('babel-preset-jest')],
}),
},
}
}