Skip to content

test(e2e): Expand Hono testing#8063

Merged
tmilewski merged 2 commits intomainfrom
tom/user-4958-expand-integration-tests-for-hono
Mar 13, 2026
Merged

test(e2e): Expand Hono testing#8063
tmilewski merged 2 commits intomainfrom
tom/user-4958-expand-integration-tests-for-hono

Conversation

@tmilewski
Copy link
Copy Markdown
Member

@tmilewski tmilewski commented Mar 13, 2026

Description

  • Add 14 new integration tests for @clerk/hono across 4 new test files (webhook verification, middleware auth details, error handling, organization-scoped auth), bringing total Hono e2e coverage from 5 to 19 tests
  • Add /me and /webhooks/clerk routes to the Hono template server, and mount OrganizationSwitcher in the client
  • Register hono.vite.withCustomRoles long-running app for organization tests

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 organization switcher UI for signed-in users.
    • Introduced webhook endpoint with signature verification.
    • Added authenticated user/org info endpoint.
    • Added a new long-running app preset to the preinitialized app list.
  • Tests

    • Added end-to-end tests for error handling, auth/middleware, organizations/roles, and webhook handling.
  • Chores

    • Added an empty changeset placeholder.

@tmilewski tmilewski self-assigned this Mar 13, 2026
@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:14pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 4ba5a43

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

@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@8063

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 4ba5a43

@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: d0358342-796b-45e0-a7f4-1c58e9cb8dfa

📥 Commits

Reviewing files that changed from the base of the PR and between 6f069f9 and 4ba5a43.

📒 Files selected for processing (3)
  • .changeset/breezy-monkeys-end.md
  • integration/tests/hono/error-handling.test.ts
  • integration/tests/hono/middleware.test.ts

📝 Walkthrough

Walkthrough

Adds a new long-running app preset (hono.vite.withCustomRoles). Extends the Hono Vite template with a GET /me endpoint returning userId, sessionId, orgId, orgRole, orgSlug, and a POST /webhooks/clerk endpoint that verifies webhooks (includes a TEST_WEBHOOK_SECRET and uses verifyWebhook). Adds an organization switcher UI mount in the signed-in client. Introduces four integration test files covering error handling, middleware/auth behavior, organization authorization, and webhook processing. Existing proxy/middleware and protected-route behavior are preserved.

🚥 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 'test(e2e): Expand Hono testing' is directly related to the main change—significantly expanding Hono integration test coverage from 5 to 19 tests across four new test files.

✏️ 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.

@tmilewski tmilewski merged commit 9a96d73 into main Mar 13, 2026
43 checks passed
@tmilewski tmilewski deleted the tom/user-4958-expand-integration-tests-for-hono branch March 13, 2026 14:22
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