forked from httptoolkit/mockttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallaby.js
40 lines (36 loc) · 883 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
module.exports = (wallaby) => {
process.env.NODE_EXTRA_CA_CERTS = './test/fixtures/test-ca.pem'
return {
files: [
'package.json',
'src/**/*.ts',
'src/**/*.gql',
'test/**/*.ts',
'test/fixtures/**/*',
'!test/**/*.spec.ts'
],
tests: [
'test/**/*.spec.ts'
],
preprocessors: {
// Package.json points `main` to the built output. We use this a lot in the integration tests, but we
// want wallaby to run on raw source. This is a simple remap of paths to lets us do that.
'test/integration/**/*.ts': file => {
return file.content.replace(
/("|')..((\/..)+)("|')/g,
'"..$2/src/main"'
);
}
},
workers: {
initial: 4,
regular: 1,
restart: true
},
testFramework: 'mocha',
env: {
type: 'node'
},
debug: true
};
};