Skip to content

test(e2e): Add integration tests for Fastify#8061

Merged
tmilewski merged 2 commits intomainfrom
tom/user-4957-add-integration-tests-for-fastify
Mar 13, 2026
Merged

test(e2e): Add integration tests for Fastify#8061
tmilewski merged 2 commits intomainfrom
tom/user-4957-add-integration-tests-for-fastify

Conversation

@tmilewski
Copy link
Copy Markdown
Member

@tmilewski tmilewski commented Mar 13, 2026

Description

  • Add end-to-end integration tests for @clerk/fastify covering basic auth flows and frontend API proxy mode
  • Add a new fastify-vite test template app with Fastify server + Vite client, using Express as a bridge to serve the Vite frontend
  • Add proxy-specific tests including a handshake redirect test that verifies x-forwarded-* headers are used to derive the public origin instead of localhost
  • Register the new fastify suite in CI and add a test:integration:fastify script

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Added Fastify framework support with Vite integration for full-stack applications with Clerk authentication.
  • Tests

    • Added integration tests for Fastify covering authentication and proxy scenarios.
    • Expanded CI coverage to include Fastify and additional frameworks in the test matrix.

@tmilewski tmilewski self-assigned this Mar 13, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 688887a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 13, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 13, 2026 2:32am

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 13, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8061

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8061

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8061

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8061

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8061

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8061

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8061

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8061

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8061

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8061

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8061

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8061

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8061

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8061

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8061

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8061

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8061

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8061

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8061

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8061

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8061

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8061

commit: 688887a

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4ce25e54-07d3-4260-a8bc-b813bae78769

📥 Commits

Reviewing files that changed from the base of the PR and between d32bf2c and 688887a.

📒 Files selected for processing (16)
  • .changeset/three-cameras-decide.md
  • .github/workflows/ci.yml
  • integration/presets/fastify.ts
  • integration/presets/index.ts
  • integration/presets/longRunningApps.ts
  • integration/templates/fastify-vite/index.html
  • integration/templates/fastify-vite/package.json
  • integration/templates/fastify-vite/src/client/main.ts
  • integration/templates/fastify-vite/src/client/tsconfig.json
  • integration/templates/fastify-vite/src/client/vite-env.d.ts
  • integration/templates/fastify-vite/src/server/main.ts
  • integration/templates/fastify-vite/tsconfig.json
  • integration/templates/index.ts
  • integration/tests/fastify/basic.test.ts
  • integration/tests/fastify/proxy.test.ts
  • package.json

📝 Walkthrough

Walkthrough

This change introduces Fastify as a new supported application framework for integration testing. It adds a Fastify preset configuration, a complete Fastify + Vite template with Clerk authentication wiring on both client and server sides, and comprehensive integration tests covering authenticated and unauthenticated access as well as frontend API proxy behavior. The CI workflow is updated to include Fastify in the integration-tests matrix, and a new npm script is added for running Fastify-specific integration tests.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding integration tests for Fastify. It accurately reflects the primary objective of the PR, which is to introduce end-to-end testing for Fastify with a new test template app and test cases.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link
Copy Markdown
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@tmilewski tmilewski merged commit f8a230f into main Mar 13, 2026
43 checks passed
@tmilewski tmilewski deleted the tom/user-4957-add-integration-tests-for-fastify branch March 13, 2026 13:35
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.

2 participants