test au vert

This commit is contained in:
styve Lioumba
2025-10-23 21:04:25 +02:00
parent 02637235e3
commit 4c1787d784
13 changed files with 482 additions and 855 deletions

View File

@@ -1,4 +1,3 @@
/** @type {import('jest').Config} */
module.exports = {
preset: 'jest-preset-angular',
rootDir: '.',
@@ -6,16 +5,14 @@ module.exports = {
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/dist/'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular'
'^.+\\.ts$': 'ts-jest', // Only transform .ts files
},
transformIgnorePatterns: [
'node_modules/(?!(@angular|rxjs|pocketbase|flat)/)', // 👈 simplifié et plus robuste
'/node_modules/(?!flat)/',
],
moduleNameMapper: {
'^@app/(.*)$': '<rootDir>/src/app/$1',
'^@env/(.*)$': '<rootDir>/src/environments/$1',
},
testMatch: ['**/*.spec.ts'],
testTimeout: 30000,
verbose: true,
globalSetup: 'jest-preset-angular/global-setup',
};