-
Notifications
You must be signed in to change notification settings - Fork 8
/
wallaby-web.js
37 lines (36 loc) · 1.22 KB
/
wallaby-web.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
process.env.BABEL_ENV="test"
process.env.ENZYME=true
process.env.NODE_ENV="TESTING"
process.env.WALLABY=true
module.exports = (wallaby) => {
return {
debug: true,
testFramework: 'jest',
files: [
'web/src/**/*.js',
'web/tests/testHelpers/**/*.js',
'!web/src/**/*.test.js',
'server/src/**/*.js',
'!server/src/**/*.spec.js',
'testing/web/features/pageObjects/*.js',
'testing/testHelpers/**/*.js',
'testing/common/**/*.js',
'testing/web/jest.config.js',
{pattern: './.enzymePreviewStyle.css', instrument: false}
],
tests: [
'testing/web/features/*.test.js',
],
compilers: {'**/*.js': wallaby.compilers.babel()},
env: {type: 'node'},
setup: function (wallaby) {
const jestConfig = require('./testing/web/jest.config');
delete jestConfig.rootDir
jestConfig.moduleNameMapper['\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$'] = '<rootDir>/testing/fileMock.js'
jestConfig.moduleDirectories = [
'node_modules', '<rootDir>/server/node_modules', '<rootDir>/web/node_modules'
];
wallaby.testFramework.configure(jestConfig);
}// --config ./clientEnzymeTest.json
}
};