b14da2f9e8
Ports twenty-website PR #21710 (Rashad) into `twenty-website-redone`. The old site's partner application form was reworked last week — required fields, a skills rethink, and fail-fast validation — after the redone had already ported the form, so the redone was running the pre-rework behavior. This brings it to parity. Re-derived into the redone's own conventions rather than copied: it reuses the redone's `STEP_REQUIRED_FIELDS`/`STEP_FORMAT_CHECKS` validator, keeps one-export-per-file, and injects the new `searchPool` as an opt-in prop.
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
const baseProject = {
|
|
preset: '../../jest.preset.js',
|
|
setupFilesAfterEnv: ['<rootDir>/test/setup-jest-dom.ts'],
|
|
transformIgnorePatterns: [
|
|
'/node_modules/(?!(twenty-ui|twenty-shared)/.*)',
|
|
'../../node_modules/(?!(twenty-ui|twenty-shared)/.*)',
|
|
],
|
|
transform: {
|
|
'^.+\\.(ts|js|tsx|jsx|mjs)$': [
|
|
'@swc/jest',
|
|
{
|
|
jsc: {
|
|
parser: { syntax: 'typescript', tsx: true },
|
|
transform: { react: { runtime: 'automatic' } },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
'^@lingui/core/macro$': '<rootDir>/test/lingui-macro-mock.ts',
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'mjs'],
|
|
};
|
|
|
|
const jestConfig = {
|
|
projects: [
|
|
{
|
|
...baseProject,
|
|
displayName: 'node',
|
|
testEnvironment: 'node',
|
|
testMatch: ['<rootDir>/src/**/*.test.ts'],
|
|
},
|
|
{
|
|
...baseProject,
|
|
displayName: 'jsdom',
|
|
testEnvironment: 'jsdom',
|
|
testMatch: ['<rootDir>/src/**/*.test.tsx'],
|
|
},
|
|
],
|
|
coverageDirectory: './coverage',
|
|
};
|
|
|
|
export default jestConfig;
|