Skip to content

test: cover operation SDK query paths#263

Open
AlonePenguin wants to merge 1 commit into
outerbase:mainfrom
AlonePenguin:codex/operation-sdk-coverage-71
Open

test: cover operation SDK query paths#263
AlonePenguin wants to merge 1 commit into
outerbase:mainfrom
AlonePenguin:codex/operation-sdk-coverage-71

Conversation

@AlonePenguin
Copy link
Copy Markdown

Purpose

Add a focused, test-only coverage slice for operation external query paths that are separate from the active operation hook/cache PR #242.

/claim #71

Tasks

  • Cover executeSDKQuery routing for PostgreSQL, MySQL, Cloudflare D1, Starbase, and Turso with mocked SDK/driver constructors.
  • Cover missing external source and unsupported provider guard paths.
  • Cover executeExternalQuery falling back to SDK execution when no Outerbase API key is configured.
  • Cover the Outerbase API branch preserving object params while normalizing multiline SQL.

Verify

  • ./node_modules/.bin/vitest run src/operation-sdk.test.ts src/operation.test.ts --reporter=verbose -> 20 tests passed
  • ./node_modules/.bin/prettier --check src/operation-sdk.test.ts -> passed
  • git diff --check -> passed

Notes:

  • ./node_modules/.bin/vitest run still fails on the existing src/rls/index.test.ts baseline expectations; this new operation slice passes and does not touch RLS.
  • ./node_modules/.bin/tsc --noEmit --pretty false still reports existing CDC/cache/DO and src/operation.ts type errors; the new src/operation-sdk.test.ts file is not in the error list.

Before

src/operation.ts SDK connection routing and the no-API-key external query fallback had no focused local coverage in this branch.

After

src/operation-sdk.test.ts exercises those paths without opening real network or database connections.

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