-
Notifications
You must be signed in to change notification settings - Fork 8
/
wallaby-mobile.js
38 lines (37 loc) · 1.12 KB
/
wallaby-mobile.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
process.env.BABEL_ENV = "test"
process.env.ENZYME = true
process.env.NODE_ENV = "TESTING"
module.exports = (wallaby) => {
return {
debug: true,
testFramework: 'jest',
files: [
'mobile/**/*.js',
'!mobile/node_modules/**',
'server/src/**/*.js',
'!server/src/**/*.spec.js',
'testing/testHelpers/**/*.js',
'testing/common/**/*.js',
'testing/mobile/**/*.snap',
'testing/mobile/jest.config.js',
'testing/mobile/**/*.js',
{pattern: 'testing/mobile/**/*.test.js', ignore: true},
{pattern: 'mobile/tests/e2e/**/spec.*.js', ignore: true},
'mobile/tests/e2e/**/*.js'
],
tests: [
'testing/mobile/App.test.js',
],
compilers: {'**/*.js': wallaby.compilers.babel()},
env: {type: 'node'},
setup: function (wallaby) {
process.env.NODE_PATH = '';
const jestConfig = require('./testing/mobile/jest.config');
delete jestConfig.rootDir
jestConfig.moduleDirectories = [
'node_modules', '<rootDir>/server/node_modules', '<rootDir>/mobile/node_modules'
];
wallaby.testFramework.configure(jestConfig);
}
}
};