mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-30 03:43:02 +03:00
315820ec86
Design: ![twenty-advanced-filters-design](https://github.com/user-attachments/assets/7d99971c-9ee1-4a78-a2fb-7ae5a9b3a836) Not ready to be merged yet! --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { JestConfigWithTsJest, pathsToModuleNameMapper } from 'ts-jest';
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const tsConfig = require('./tsconfig.json');
|
|
process.env.TZ = 'GMT';
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
|
// to enable logs, comment out the following line
|
|
silent: true,
|
|
displayName: 'twenty-front',
|
|
preset: '../../jest.preset.js',
|
|
setupFilesAfterEnv: ['./setupTests.ts'],
|
|
testEnvironment: 'jsdom',
|
|
transformIgnorePatterns: ['../../node_modules/'],
|
|
transform: {
|
|
'^.+\\.(ts|js|tsx|jsx)$': '@swc/jest',
|
|
},
|
|
moduleNameMapper: {
|
|
'\\.(jpg|jpeg|png|gif|webp|svg|svg\\?react)$':
|
|
'<rootDir>/__mocks__/imageMock.js',
|
|
'\\.css$': '<rootDir>/__mocks__/styleMock.js',
|
|
...pathsToModuleNameMapper(tsConfig.compilerOptions.paths),
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
|
coverageThreshold: {
|
|
global: {
|
|
statements: 58,
|
|
lines: 55,
|
|
functions: 47,
|
|
},
|
|
},
|
|
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',
|
|
],
|
|
coverageDirectory: './coverage',
|
|
};
|
|
|
|
export default jestConfig;
|