Files
twenty/packages/twenty-server/jest.config.ts
Félix Malfait 8df59c085d Lingui working with NODE ENV=production again (#10067)
Lingui now offers an option to disable stripping even in prod mode so we
can bring it back
2025-02-07 10:05:07 +01:00

50 lines
1.1 KiB
TypeScript

const jestConfig = {
// to enable logs, comment out the following line
silent: true,
clearMocks: true,
displayName: 'twenty-server',
rootDir: './',
testEnvironment: 'node',
transformIgnorePatterns: ['/node_modules/'],
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': [
'@swc/jest',
{
jsc: {
parser: {
syntax: 'typescript',
tsx: false,
decorators: true,
},
transform: {
decoratorMetadata: true,
},
experimental: {
plugins: [
[
'@lingui/swc-plugin',
{
stripNonEssentialFields: false,
},
],
],
},
},
},
],
},
moduleNameMapper: {
'^src/(.*)': '<rootDir>/src/$1',
},
moduleFileExtensions: ['js', 'json', 'ts'],
modulePathIgnorePatterns: ['<rootDir>/dist'],
fakeTimers: {
enableGlobally: true,
},
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: '../coverage',
};
export default jestConfig;