Skip to content

test: cover durable object bootstrap helpers#269

Open
TechEnthusGH wants to merge 2 commits into
outerbase:mainfrom
TechEnthusGH:test/durable-object-bootstrap-coverage
Open

test: cover durable object bootstrap helpers#269
TechEnthusGH wants to merge 2 commits into
outerbase:mainfrom
TechEnthusGH:test/durable-object-bootstrap-coverage

Conversation

@TechEnthusGH

Copy link
Copy Markdown

Summary

  • Add focused Vitest coverage for StarbaseDBDurableObject bootstrap behavior.
  • Cover constructor-created internal temp tables (tmp_cache, allowlist tables, RLS policies).
  • Cover init() returning bound helper methods and raw query cursor metadata for parameterized queries.

This is intentionally test-only and scoped to src/do.test.ts.

Bounty

/claim #71

Validation

  • corepack pnpm exec vitest run src/do.test.ts -> 9 tests passed
  • corepack pnpm exec prettier --check src/do.test.ts -> passed
  • git diff --check -> passed
  • corepack pnpm exec vitest run --coverage --coverage.reporter=json-summary --coverage.reporter=text-summary -> existing unrelated RLS baseline failures remain; this PR improves src/do.ts coverage from 41.17% to 51.96% lines, 37.5% to 62.5% functions, and 17.64% to 29.41% branches.

Full-suite baseline note: current main already fails four src/rls/index.test.ts assertions and the global branch threshold before this PR's changes.

Demo

This is a test-only coverage PR; the focused terminal verification above demonstrates the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant