Server actions are async functions. Test them directly without rendering UI. Mock requireAuth() and the Supabase client.
Why This Matters
Testing server actions through UI rendering is slow, flaky, and doesn't isolate the mutation logic from rendering concerns.
Tags
nextjssupabaseTesting
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and 3+ others. Get actionable feedback before code ships.