-
Notifications
You must be signed in to change notification settings - Fork 12
/
jest.config.js
31 lines (27 loc) · 1.2 KB
/
jest.config.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
const { createConfig } = require('@openedx/frontend-build');
const config = createConfig('jest', {
// setupFilesAfterEnv is used after the jest environment has been loaded. In general this is what you want.
// If you want to add config BEFORE jest loads, use setupFiles instead.
setupFilesAfterEnv: [
'<rootDir>/src/setupTest.js',
],
coveragePathIgnorePatterns: [
'src/setupTest.js',
'src/i18n',
'src/hooks/testHooks', // don't check coverage for jest mocking tools
// 'src/data/services/lms/fakeData', // don't check coverage for mock data
'src/test', // don't check coverage for test integration test utils
'messages.js', // don't check coverage for i18n messages
'src/data/services/lms/fakeData', // don't check coverage for fake data
],
testTimeout: 120000,
moduleNameMapper: {
'@edx/frontend-lib-special-exams': '<rootDir>/node_modules/@edx/frontend-lib-special-exams',
},
});
config.moduleDirectories = ['node_modules', 'src'];
// add axios to the list of modules to not transform
config.transformIgnorePatterns = ['/node_modules/(?!@(open)?edx|axios)'];
config.testPathIgnorePatterns = ['/dist'];
console.log({ jestTestConfig: config });
module.exports = config;