Skip to content

test: improve Vitest unit test coverage above 75% thresholds (#71) - #320

Open
sonofkratos92 wants to merge 1 commit into
outerbase:mainfrom
sonofkratos92:test-improve-vitest-coverage-71
Open

sonofkratos92 wants to merge 1 commit into
outerbase:mainfrom
sonofkratos92:test-improve-vitest-coverage-71

Conversation

@sonofkratos92

Copy link
Copy Markdown

Fixes #71
/claim #71

Summary

  • Added unit test suites for previously untested modules:
    • src/allowlist/index.test.ts (isQueryAllowed AST normalization, admin bypass, disabled flag, and tmp_allowlist_rejections logging)
    • src/import/csv.test.ts (importTableFromCsvRoute across text/csv, application/json with columnMapping, and multipart/form-data, plus row failure handling)
    • src/index.test.ts (Worker fetch entrypoint covering CORS preflight, Durable Object location hints, external/Hyperdrive data source configuration, pre-auth plugin routing, static admin/client tokens, and JWKS JWT verification)
  • Expanded test coverage for src/do.test.ts, src/handler.test.ts, src/operation.test.ts (including executeSDKQuery and Hyperdrive execution), and src/rls/index.test.ts.
  • All 22 test suites (199 tests) pass with overall coverage above the 75% thresholds (96.41% statements, 81.32% branches, 98.52% functions, 96.72% lines).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve test coverage with Vitest

1 participant