4030 audit and stabilize flaky tests - #4435
Merged
MuhammadKhalilzadeh merged 13 commits intoAug 12, 2026
Merged
Conversation
…aky-tests Resolve conflict in Clients/e2e/global.setup.ts by keeping both sides: - E2E seed DB env injection (NODE_ENV=test + parsed Servers/.env.test) - execFileSync with --output-file temp credentials file (from merged branch)
✅ Coverage Gate PassedAll coverage thresholds are met. |
# Conflicts: # Servers/routes/user.route.ts
Merging develop brought in an imported isNonProduction from rateLimit.middleware, but user.route still declared a local const with the same name. This caused TS2440 and broke the build/ZAP/E2E/backend checks. - Remove the local nodeEnv/isNonProduction re-declaration. - Use the imported isNonProduction directly for the login limiter.
MuhammadKhalilzadeh
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Audit and stabilize flaky tests
Review existing test suites for real timers, unawaited promises, missing waitFor, and non-deterministic data.
Fix the worst offenders first (e.g., async hook tests and tests asserting on console.log).
Acceptance: the test suite passes three consecutive local/CI runs without retries and no test relies on real network/time.
Write your issue number after "Fixes "
Fixes #4030
Please ensure all items are checked off before requesting a review:
npm run generate:swagger).authenticateJWTand the generated spec declaresbearerAuthsecurity.npm run check:api-driftand committed the regeneratedswagger.yamlandendpoints.ts.