You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently the test coverage of the project is nearly non-existent. We do have and use Vitest as a dependency in the Starbase project already that future tests should also use. The idea is to begin accumulating test coverage throughout the entire project.
Goal is to bring test coverage up to above 75% with meaningful tests.
Describe the solution you'd like
Important: Tests should not just be made for line coverage, they should also include meaningful tests that help reveal when issues arise. For example, if we were to write a test for our LiteREST code to see if making a request fetched data we would pass it potentially:
Add comprehensive Vitest unit test suite for Query Allowlist (src/allowlist/index.ts):
Test feature toggle bypass (isEnabled: false) and administrative bypass (config.role === "admin").
Test validation edge cases (missing SQL input, loadAllowlist database failure).
Test AST normalization and query comparison (exact match, structural AST match).
Test rejected query logging into tmp_allowlist_rejections and rejection insertion error resilience.
Add comprehensive Vitest unit test suite for SQL Macros (plugins/sql-macros/index.ts):
Test middleware registration and config capturing.
Test SELECT * prevention for non-admin users, admin bypass, explicit column allowance, non-SELECT statement handling, and syntax error resilience.
Test $_exclude column macro replacement with single and multiple excluded columns, non-internal data source bypass, pragma query bypass, and normal queries.
Zero production code changes. All 21 new tests pass with Vitest and comply with Prettier style checks.
Opened #352 with the first batch: 8 tests for src/allowlist (previously untested) plus a one-line fix for a truthy-Error allowlist bypass on empty SQL. CI: 8/8 pass; the only suite failures are pre-existing RLS tests on main. Happy to keep adding coverage module by module.
Activity
Brayden commentedon Jan 24, 2025
/bounty $250
algora-pbc commentedon Jan 24, 2025
💎 $250 bounty • Outerbase (YC W23)
Steps to solve:
/attempt #71with your implementation plan/claim #71in the PR body to claim the bounty❗ Important guidelines:
Thank you for contributing to outerbase/starbasedb!
varshith257 commentedon Jan 24, 2025
/attempt #71
TypeScript & more
aybanda commentedon Jan 24, 2025
/attempt #71
Julia & more
varshith257 commentedon Jan 24, 2025
@Brayden There are a few bugs in implementations that are getting found during tests. I am fixing them too along with the testing. Could I draft PR?
Brayden commentedon Jan 24, 2025
You may absolutely fix issues along the way. Feel free to draft a PR @varshith257!
varshith257 commentedon Jan 24, 2025
@Brayden I have opened
and fixing few more implementations caught in the way in testing
algora-pbc commentedon Jan 24, 2025
💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.
algora-pbc commentedon Feb 17, 2025
🎉🎈 @varshith257 has been awarded $250! 🎈🎊
Myc911 commentedon Apr 23, 2026
/attempt #71
feat: improve RLS security and add replication plugin tests (outerbas…
pofuhermes-bit commentedon Apr 23, 2026
/attempt #71
Implementation plan:
pnpm test -- --coverageand only submit if thresholds passI'll include
/claim #71in the PR body and a short demo video if I get this green.99 remaining items
sonofkratos92 commentedon Oct 27, 2026
/attempt #71
Yuvi1192p commentedon Oct 29, 2026
/attempt #71
Submitted in PR #309 (opened Oct 24):
All acceptance criteria complete in PR #309, ready for maintainer review!
test(plugins/resend): add comprehensive Vitest unit test suite (fixes o…
GabrielHFGoncalez commentedon Nov 4, 2026
/attempt #71
Submitted focused, non-overlapping Vitest coverage for
plugins/resend/index.ts: #324Scope is test-only, covering initialization, headers, payload serialization, and error branches.
GabrielHFGoncalez commentedon Nov 4, 2026
/attempt #71
Submitted comprehensive Vitest test coverage for the Resend plugin (plugins/resend/index.test.ts):
PR: #324
test(stats): add comprehensive Vitest unit test suite (closes outerba…
test(sql-macros): add Vitest unit test suite (closes outerbase#71)
test(cron): add Vitest unit test suite (closes outerbase#71)
test(stripe): add Vitest unit test suite (closes outerbase#71)
test(clerk): add Vitest unit test suite (closes outerbase#71)
satoshinakamoto666666 commentedon Nov 11, 2026
/claim #71
Submitted complete, unit-tested implementation in PR: #341
Implementation & Verification Summary
test/improve-vitest-coverage-71(7031c0f152)4filespytest tests/test_starbasedb_vitest_coverage.py -q-> 1/1 passedPayout Wallets
0x971b573b47357c22a67FcE8c56Aaeb478356C942Aw2hhJvjewAcxssyWMzKmFge6jWxEzN6GiFQgyZNKaktGCJZA6CW23ABZSJIPSDCDHWAKDC35BQCSKDDMTIAKTCCZ6K3HV7TLOTDRTCfe0ac752b80e543048c0d91e7dddd1277678b8a5(bcn_fe0ac752b80e)14KXqz6bKtJLq61guEFup3BWMarTDaxwwWBEcsYGtaFwXcvpLu5iJzBxnH88Mn8QSnvkEJZ2NcWy4Lw3ZcUtr4hvbkGkhuxaiphi-stack commentedon Nov 14, 2026
/attempt #71
Submitted PR #347 with 100% deterministic unit test suites across all 5 modules (
18 / 18tests passing in Vitest).Gubaarev commentedon Nov 15, 2026
/attempt #71
Implementation plan:
src/allowlist/index.ts):isEnabled: false) and administrative bypass (config.role === "admin").tmp_allowlist_rejectionsand rejection insertion error resilience.plugins/sql-macros/index.ts):$_excludecolumn macro replacement with single and multiple excluded columns, non-internal data source bypass, pragma query bypass, and normal queries.AgoniJJ commentedon Nov 15, 2026
Opened #352 with the first batch: 8 tests for
src/allowlist(previously untested) plus a one-line fix for a truthy-Error allowlist bypass on empty SQL. CI: 8/8 pass; the only suite failures are pre-existing RLS tests on main. Happy to keep adding coverage module by module.Hidayat666-ali commentedon Nov 15, 2026
/attempt #71
Implementation Plan: Improve Vitest Test Coverage
Submitting full, comprehensive Vitest test coverage for previously untested modules (#71):