-
Notifications
You must be signed in to change notification settings - Fork 88
/
wallaby.js
44 lines (40 loc) · 1.01 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
const path = require('path');
module.exports = (wallaby) => {
return {
files: [
'package.json',
'src/**/*.ts',
'src/**/*.gql',
'test/**/*.ts',
{ pattern: 'test/fixtures/**/*.pfx', load: false, binary: true },
'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: 1,
regular: 1,
restart: true
},
testFramework: 'mocha',
env: {
type: 'node',
params: {
env: `NODE_EXTRA_CA_CERTS=${path.resolve(__dirname, 'test/fixtures/test-ca.pem')}`
}
},
debug: true
};
};