Home
零对冲(ZeroHedge)
每日HackerNews
Show HN: Supabase-Test – 为测试 Supabase RLS 而设计的快速隔离 Postgres 数据库
Show HN: Supabase-Test – Fast Isolated Postgres DBs for Testing Supabase RLS
原始链接:
https://www.npmjs.com/package/supabase-test
启用 JavaScript 和 Cookie 以继续。
## Supabase-Test:简化的 RLS 测试 一个新的框架 **supabase-test** 旨在简化 Supabase 行级别安全 (RLS) 策略的测试。它为每个测试用例创建快速、隔离的 Postgres 数据库,无需复杂的全局 fixtures 或模拟身份验证。 主要功能包括测试后自动回滚、通过 `.setContext()` 进行身份验证模拟的本地 RLS 测试,以及灵活的数据填充选项(SQL、CSV、JSON、JS)。该框架与流行的测试运行器(如 Jest 和 Mocha)兼容,并与 CI/CD 管道(如 GitHub Actions)集成良好。 创建者 LaunchQL 提供了示例项目和教程来帮助用户入门:[https://launchql.com/learn/supabase](https://launchql.com/learn/supabase)。该包可在 npm 上获取:[https://www.npmjs.com/package/supabase-test](https://www.npmjs.com/package/supabase-test),源代码在 GitHub 上:[https://github.com/launchql/supabase-test-suite](https://github.com/launchql/supabase-test-suite)。
相关文章
原文
Enable JavaScript and cookies to continue
联系我们 contact @ memedata.com