OU
test: cover clerk plugin
outerbase/starbasedb#176

/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.

Claim

Total prize pool $250
Total paid $0
Status Pending
Submitted May 12, 2026
Last updated May 12, 2026

Contributors

TR

Treasure520520

@Treasure520520

100%

Sponsors

OU

Outerbase (YC W23)

@outerbase

$250