the-tip-top-backend/src/middleware
soufiane 74a7f387c5 fix: resolve test failures in CI pipeline
- Add jest.setup.js with JWT_SECRET for test environment
- Update jest.config.js with setupFiles and increased timeout
- Fix auth middleware to return 401 (not 403) for invalid JWT tokens
- Fix errorHandler to return 'message' instead of 'error' in response
- Fix validate middleware to properly detect Zod errors in ESM
- Remove unused 'pool' import in middleware tests (lint fix)
- Update middleware tests to check next() calls with AppError

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:05:00 +01:00
..
auth.js fix: resolve test failures in CI pipeline 2025-11-27 12:05:00 +01:00
errorHandler.js fix: resolve test failures in CI pipeline 2025-11-27 12:05:00 +01:00
metrics.js feat: add HTTP metrics middleware for Prometheus monitoring 2025-11-26 10:54:45 +01:00
validate.js fix: resolve test failures in CI pipeline 2025-11-27 12:05:00 +01:00