Skip to content

4030 audit and stabilize flaky tests - #4435

Merged
MuhammadKhalilzadeh merged 13 commits into
developfrom
4030-audit-and-stabilize-flaky-tests
Aug 12, 2026
Merged

4030 audit and stabilize flaky tests#4435
MuhammadKhalilzadeh merged 13 commits into
developfrom
4030-audit-and-stabilize-flaky-tests

Conversation

@DeboraSerra

Copy link
Copy Markdown
Contributor

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:

  • I deployed the code locally.
  • I have performed a self-review of my code.
  • I have included the issue # in the PR.
  • I have labelled the PR correctly.
  • The issue I am working on is assigned to me.
  • I have avoided using hardcoded values to ensure scalability and maintain consistency across the application.
  • I have ensured that font sizes, color choices, and other UI elements are referenced from the theme.
  • My pull request is focused and addresses a single, specific feature.
  • If there are UI changes, I have attached a screenshot or video to this PR.
  • If I added or modified an API endpoint, the change is reflected in the generated OpenAPI spec (npm run generate:swagger).
  • If the endpoint requires authentication, it uses authenticateJWT and the generated spec declares bearerAuth security.
  • I ran npm run check:api-drift and committed the regenerated swagger.yaml and endpoints.ts.
  • If this PR adds or modifies an organization-scoped table, the tenant isolation registry and test matrix are updated. See the tenant isolation runbook for details.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Coverage Gate Passed

All 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
MuhammadKhalilzadeh merged commit 9a30b4c into develop Aug 12, 2026
22 checks passed
@MuhammadKhalilzadeh
MuhammadKhalilzadeh deleted the 4030-audit-and-stabilize-flaky-tests branch August 12, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit and stabilize flaky tests

2 participants