Increase test coverage for /modules/ui (#3314)
* Increase test coverage for `/modules/ui` Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: FellipeMTX <fellipefacdir@gmail.com> Co-authored-by: Fellipe Montes <102544529+FellipeMTX@users.noreply.github.com> * Merge main Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: FellipeMTX <fellipefacdir@gmail.com> Co-authored-by: Fellipe Montes <102544529+FellipeMTX@users.noreply.github.com> * Fix tests * Fix tests * Fix --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: FellipeMTX <fellipefacdir@gmail.com> Co-authored-by: Fellipe Montes <102544529+FellipeMTX@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
42
packages/twenty-front/jest.config.ts
Normal file
42
packages/twenty-front/jest.config.ts
Normal file
@ -0,0 +1,42 @@
|
||||
export default {
|
||||
setupFilesAfterEnv: ['./src/setupTests.ts'],
|
||||
testEnvironment: 'jsdom',
|
||||
transform: {
|
||||
'^.+\\.(ts|js|tsx|jsx)$': '@swc/jest',
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'~/(.+)': '<rootDir>/src/$1',
|
||||
'@/(.+)': '<rootDir>/src/modules/$1',
|
||||
'@testing/(.+)': '<rootDir>/src/testing/$1',
|
||||
'\\.(jpg|jpeg|png|gif|webp|svg)$': '<rootDir>/__mocks__/imageMock.js',
|
||||
},
|
||||
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
statements: 10,
|
||||
lines: 10,
|
||||
functions: 7,
|
||||
},
|
||||
},
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
|
||||
coveragePathIgnorePatterns: [
|
||||
'states/.+State.ts$',
|
||||
'states/selectors/*',
|
||||
'contexts/.+Context.ts',
|
||||
'testing/*',
|
||||
'tests/*',
|
||||
'config/*',
|
||||
'graphql/queries/*',
|
||||
'graphql/mutations/*',
|
||||
'graphql/fragments/*',
|
||||
'types/*',
|
||||
'constants/*',
|
||||
'generated-metadata/*',
|
||||
'generated/*',
|
||||
'__stories__/*',
|
||||
'display/icon/index.ts',
|
||||
],
|
||||
testPathIgnorePatterns: ['src/modules/activities/blocks/spec.ts'],
|
||||
// coverageDirectory: '<rootDir>/coverage/',
|
||||
};
|
||||
Reference in New Issue
Block a user