Remove old configuration, API client, and redundant crypto mocks

- Deleted legacy `config` module and replaced its usage with the new runtime-validated `app.config`.
- Removed old custom Axios `apiClient` with outdated token refresh logic.
- Cleaned up redundant crypto-related mocks in storage tests and replaced them with real encryption/decryption during testing.
- Updated Jest coverage exclusions to reflect the new file structure and generated client usage.
This commit is contained in:
Felipe Cardoso
2025-10-31 23:04:53 +01:00
parent 092a82ee07
commit b4866f9100
7 changed files with 190 additions and 382 deletions

View File

@@ -21,6 +21,14 @@ const customJestConfig = {
'!src/**/*.d.ts',
'!src/**/*.stories.{js,jsx,ts,tsx}',
'!src/**/__tests__/**',
'!src/lib/api/generated/**', // Auto-generated API client - do not test
'!src/lib/api/client.ts', // TODO: Replace with generated client + thin interceptor wrapper
'!src/lib/api/errors.ts', // TODO: Remove - error parsing should be in generated client
'!src/**/*.old.{js,jsx,ts,tsx}', // Old implementation files
'!src/components/ui/**', // shadcn/ui components - third-party, no need to test
'!src/app/**', // Next.js app directory - layout/page files (test in E2E)
'!src/**/index.{js,jsx,ts,tsx}', // Re-export index files - no logic to test
'!src/lib/utils/cn.ts', // Simple utility function from shadcn
],
coverageThreshold: {
global: {