Skip to content

test: cover clerk plugin auth and webhooks#175

Open
xingxi0614-cpu wants to merge 1 commit into
outerbase:mainfrom
xingxi0614-cpu:test-clerk-plugin-auth-webhook
Open

test: cover clerk plugin auth and webhooks#175
xingxi0614-cpu wants to merge 1 commit into
outerbase:mainfrom
xingxi0614-cpu:test-clerk-plugin-auth-webhook

Conversation

@xingxi0614-cpu
Copy link
Copy Markdown

/claim #71

Summary:

  • Added focused Vitest coverage for ClerkPlugin setup, webhook handling, and session authentication.
  • Covered required signing-secret validation, middleware table setup, and the verifySessions: false setup path.
  • Covered missing Svix headers, mismatched Clerk instance IDs, user upsert events, and revoked-session deletion events.
  • Covered session auth disabled, cookie JWT verification, permitted-origin enforcement, and session lookup behavior.

Verification / demo:

  • pnpm vitest --run plugins/clerk/index.test.ts -> 1 file passed, 10 tests passed
  • pnpm exec prettier --check plugins/clerk/index.test.ts -> all matched files use Prettier code style
  • git diff --check -> no whitespace errors

No production behavior was changed; this is intentionally scoped to plugins/clerk/index.test.ts and does not overlap with the active import/export/LiteREST/handler/worker/DO/operation/cache/RLS/allowlist/sql-macros/stats/cron/resend/studio/stripe/websocket coverage PRs.

AI-assisted with Codex; I reviewed the diff and kept the PR scoped to this Clerk plugin coverage gap.

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