Skip to content

test: cover clerk plugin - #176

Open
Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-clerk-plugin-coverage
Open

Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-clerk-plugin-coverage

Conversation

@Treasure520520

Copy link
Copy Markdown

/claim #71

Summary

  • add focused Vitest coverage for the Clerk plugin constructor, table bootstrap, webhook handling, and session authentication paths
  • mock svix and jose so the tests exercise the plugin behavior without external Clerk services or real JWT keys
  • cover user/session webhook writes, invalid instance rejection, session verification bypasses, missing DB sessions, and DB lookup failures

Verification

  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec prettier --check plugins/clerk/index.test.ts
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest plugins/clerk/index.test.ts --run
  • git diff --check
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec tsc --noEmit --pretty false still reports existing repository type errors in plugins/cdc, src/cache, src/do, and src/operation; no errors mention plugins/clerk/index.test.ts
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest --run still reports the existing 4 RLS failures in src/rls/index.test.ts; the new Clerk test file passes in the full run

Notes

This is a non-overlapping coverage slice for #71, separate from the Stripe and WebSocket plugin test PRs I submitted earlier.

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