2023-12-10 18:22:43 +03:00
|
|
|
export default {
|
2024-03-05 19:43:31 +03:00
|
|
|
// to enable logs, comment out the following line
|
|
|
|
silent: true,
|
2024-01-11 10:51:36 +03:00
|
|
|
setupFilesAfterEnv: ['./src/setupTests.ts'],
|
|
|
|
testEnvironment: 'jsdom',
|
2023-12-10 18:22:43 +03:00
|
|
|
transform: {
|
2024-01-11 10:51:36 +03:00
|
|
|
'^.+\\.(ts|js|tsx|jsx)$': '@swc/jest',
|
2023-12-10 18:22:43 +03:00
|
|
|
},
|
|
|
|
moduleNameMapper: {
|
2024-01-11 10:51:36 +03:00
|
|
|
'~/(.+)': '<rootDir>/src/$1',
|
|
|
|
'@/(.+)': '<rootDir>/src/modules/$1',
|
|
|
|
'@testing/(.+)': '<rootDir>/src/testing/$1',
|
2024-01-12 20:05:56 +03:00
|
|
|
'\\.(jpg|jpeg|png|gif|webp|svg|svg\\?react)$':
|
|
|
|
'<rootDir>/__mocks__/imageMock.js',
|
2023-12-10 18:22:43 +03:00
|
|
|
},
|
|
|
|
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
2023-12-14 22:08:03 +03:00
|
|
|
coverageThreshold: {
|
|
|
|
global: {
|
2024-02-09 17:14:39 +03:00
|
|
|
statements: 70,
|
|
|
|
lines: 70,
|
|
|
|
functions: 60,
|
2023-12-14 22:08:03 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
|
|
|
|
coveragePathIgnorePatterns: [
|
|
|
|
'states/.+State.ts$',
|
2024-01-11 10:51:36 +03:00
|
|
|
'states/selectors/*',
|
2023-12-14 22:08:03 +03:00
|
|
|
'contexts/.+Context.ts',
|
|
|
|
'testing/*',
|
|
|
|
'tests/*',
|
|
|
|
'config/*',
|
|
|
|
'graphql/queries/*',
|
|
|
|
'graphql/mutations/*',
|
|
|
|
'graphql/fragments/*',
|
|
|
|
'types/*',
|
|
|
|
'constants/*',
|
|
|
|
'generated-metadata/*',
|
|
|
|
'generated/*',
|
|
|
|
'__stories__/*',
|
2024-01-11 10:51:36 +03:00
|
|
|
'display/icon/index.ts',
|
2023-12-14 22:08:03 +03:00
|
|
|
],
|
2023-12-10 18:22:43 +03:00
|
|
|
// coverageDirectory: '<rootDir>/coverage/',
|
2024-01-11 10:51:36 +03:00
|
|
|
};
|