{"by":"pyramation","descendants":10,"id":45996064,"kids":[46044120,46040226],"score":30,"text":"Hi HN — we&#x27;ve built a testing framework for Supabase that spins up fast,\nisolated Postgres databases for each test case. It’s designed to make RLS\npolicies easy to validate with real database state, without global test\nfixtures or mock auth.<p>Features:\n- Instant isolated Postgres DBs per test\n- Automatic rollback after each test\n- RLS-native testing with `.setContext()` for auth simulation\n- Flexible seeding (SQL, CSV, JSON, JS)\n- Works with Jest, Mocha, and any async test runner\n- CI-friendly (runs cleanly in GitHub Actions)<p>We also published example projects and a free set of tutorials:\n<a href=\"https:&#x2F;&#x2F;launchql.com&#x2F;learn&#x2F;supabase\" rel=\"nofollow\">https:&#x2F;&#x2F;launchql.com&#x2F;learn&#x2F;supabase</a><p>Package:\n<a href=\"https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;supabase-test\" rel=\"nofollow\">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;supabase-test</a><p>Source + full test suite:\n<a href=\"https:&#x2F;&#x2F;github.com&#x2F;launchql&#x2F;supabase-test-suite\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;launchql&#x2F;supabase-test-suite</a><p>Happy to answer questions and get feedback, cheers :)","time":1763663978,"title":"Show HN: Supabase-Test – Fast Isolated Postgres DBs for Testing Supabase RLS","type":"story","url":"https://www.npmjs.com/package/supabase-test"}