twenty/packages/twenty-front/jest.config.js
gitstart-twenty 5f7442cf23
Add jest tests for twenty-front (#2983)
* Add jest tests for twenty-front

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix tests

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-15 10:53:20 +01:00

39 lines
903 B
JavaScript

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",
},
extensionsToTreatAsEsm: ['.ts', '.tsx'],
coverageThreshold: {
global: {
statements: 10,
lines: 10,
functions: 7,
},
},
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
coveragePathIgnorePatterns: [
'states/.+State.ts$',
'contexts/.+Context.ts',
'testing/*',
'tests/*',
'config/*',
'graphql/queries/*',
'graphql/mutations/*',
'graphql/fragments/*',
'types/*',
'constants/*',
'generated-metadata/*',
'generated/*',
'__stories__/*',
],
// coverageDirectory: '<rootDir>/coverage/',
}