2023-12-10 18:22:43 +03:00
|
|
|
export default {
|
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',
|
|
|
|
'\\.(jpg|jpeg|png|gif|webp|svg)$': '<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: {
|
|
|
|
statements: 10,
|
|
|
|
lines: 10,
|
2023-12-15 12:53:20 +03:00
|
|
|
functions: 7,
|
2023-12-14 22:08:03 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
collectCoverage: true,
|
|
|
|
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
|
|
|
};
|