Split from https://github.com/twentyhq/twenty/pull/4518 Part of https://github.com/twentyhq/twenty/issues/4766 - Re-generates some of the twenty-ui test and storybook config with Nx - Includes tsx files in twenty-ui tests and compiles them with swc --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
24 lines
616 B
TypeScript
24 lines
616 B
TypeScript
import { JestConfigWithTsJest } from 'ts-jest';
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
|
displayName: 'twenty-ui',
|
|
preset: '../../jest.preset.js',
|
|
setupFilesAfterEnv: ['./setupTests.ts'],
|
|
transformIgnorePatterns: ['../../node_modules/'],
|
|
transform: {
|
|
'^.+\\.[tj]sx?$': [
|
|
'@swc/jest',
|
|
{
|
|
jsc: {
|
|
parser: { syntax: 'typescript', tsx: true },
|
|
transform: { react: { runtime: 'automatic' } },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
coverageDirectory: '../../coverage/packages/twenty-ui',
|
|
};
|
|
|
|
export default jestConfig;
|