Skip to content

test(backend): fix pre-existing Express 5 integration test breakage - #681

Merged
LucasSantana-Dev merged 1 commit into
mainfrom
fix/integration-tests-express5
Apr 17, 2026
Merged

LucasSantana-Dev merged 1 commit into
mainfrom
fix/integration-tests-express5

Conversation

@LucasSantana-Dev

Copy link
Copy Markdown
Owner

Summary

Fixes all 24 integration test suites that were broken under Express 5. The root cause was the requireAuth middleware using promise chaining (.then()/.catch()) without properly returning, causing connection resets.

Changes

  • Converted requireAuth middleware from promise chaining to async/await with try/catch
  • Properly handles async middleware execution and error propagation in Express 5
  • All integration tests now pass (329/331 tests, 2 skipped)

Test Results

Before: 1 failed, 23 passed (100% pass rate on 24 suites)
After: 24 passed, 24 total (100% pass rate)

This unblocks coverage on PRs #676, #678, #679, #680.

The requireAuth middleware was using .then()/.catch() without properly
returning, causing connection resets in Express 5. Converted to async/await
with try/catch to properly handle async middleware execution and error
propagation. This fixes 24 failing integration test suites that are now all
passing (329/331 tests, 2 skipped).
@vercel

vercel Bot commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 17, 2026 6:42am

Request Review

@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 25 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 25 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d212fcb6-58fb-4695-bf7c-e16e1fc20094

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0eeb0 and 4b2940f.

📒 Files selected for processing (1)
  • packages/backend/src/middleware/auth.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/integration-tests-express5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 9ae4a4e into main Apr 17, 2026
12 checks passed
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
#681)

The requireAuth middleware was using .then()/.catch() without properly
returning, causing connection resets in Express 5. Converted to async/await
with try/catch to properly handle async middleware execution and error
propagation. This fixes 24 failing integration test suites that are now all
passing (329/331 tests, 2 skipped).
@LucasSantana-Dev
LucasSantana-Dev deleted the fix/integration-tests-express5 branch May 23, 2026 02:21

This branch was successfully deployed

1 active deployment
Preview — 4b2940fd Deployed Apr 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant