-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwallaby.js
More file actions
54 lines (44 loc) · 1.34 KB
/
wallaby.js
File metadata and controls
54 lines (44 loc) · 1.34 KB
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
48
49
50
51
52
53
54
module.exports = function (wallaby) {
const path = require('path');
process.env.NODE_PATH +=
path.delimiter +
path.join(__dirname, 'node_modules');
return {
hints: {
ignoreCoverage: /istanbul ignore next/
},
files: [
'src/**/*.ts',
'src/**/*.tsx',
'!src/**/__tests__/*.ts',
'!src/**/__tests__/*.tsx'
],
tests: [
'src/**/__tests__/*.spec.ts',
'src/**/__tests__/*.spec.tsx'
],
env: {
type: 'node',
runner: 'node'
},
testFramework: 'jest',
setup: () => {
global.__DEV__ = true;
global.__TEST__ = true;
global.window = global;
window.addEventListener = () => {};
window.requestAnimationFrame = () => {
throw new Error('requestAnimationFrame is not supported in Node');
};
wallaby.testFramework.configure({
moduleNameMapper: {
'^react-native$': 'react-native-web'
}
});
},
compilers: {
'**/*.ts': wallaby.compilers.typeScript(require('./tsconfig.json')),
'**/*.tsx': wallaby.compilers.typeScript(require('./tsconfig.json'))
}
};
};