mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 03:51:36 +03:00
08a9db2df6
PR Summary: 1. Added `Twenty Shared` Package to centralize utilitiies as mentioned in #8942 2. Optimization of `getImageAbsoluteURI.ts` to handle edge cases ![image](https://github.com/user-attachments/assets/c72a3061-6eba-46b8-85ac-869f06bf23c0) --------- Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { JestConfigWithTsJest, pathsToModuleNameMapper } from 'ts-jest';
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const tsConfig = require('./tsconfig.json');
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
|
displayName: 'twenty-ui',
|
|
preset: '../../jest.preset.js',
|
|
testEnvironment: 'jsdom',
|
|
transformIgnorePatterns: ['../../node_modules/'],
|
|
transform: {
|
|
'^.+\\.[tj]sx?$': [
|
|
'@swc/jest',
|
|
{
|
|
jsc: {
|
|
parser: { syntax: 'typescript', tsx: true },
|
|
transform: { react: { runtime: 'automatic' } },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
'\\.(jpg|jpeg|png|gif|webp|svg|svg\\?react)$':
|
|
'<rootDir>/__mocks__/imageMock.js',
|
|
...pathsToModuleNameMapper(tsConfig.compilerOptions.paths),
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
|
coverageDirectory: './coverage',
|
|
coverageThreshold: {
|
|
global: {
|
|
statements: 100,
|
|
lines: 100,
|
|
functions: 100,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default jestConfig;
|