Skip to content

test: cover sql macros plugin - #170

Closed
mt211211 wants to merge 1 commit into
outerbase:mainfrom
mt211211:codex/sql-macros-coverage-71
Closed

mt211211 wants to merge 1 commit into
outerbase:mainfrom
mt211211:codex/sql-macros-coverage-71

Conversation

@mt211211

@mt211211 mt211211 commented May 12, 2026 •

Copy link
Copy Markdown

/claim #71

Summary

  • Add focused Vitest coverage for plugins/sql-macros/index.ts.
  • Cover SQL macros registration, $_exclude expansion, no-data-source behavior, external-source/pragma/non-select bypasses, schema lookup fallback, and SELECT * enforcement.
  • Fix parser AST normalization so SELECT * prevention works whether node-sql-parser returns a single statement object or an array.

This is a small SQL macros slice that is non-overlapping with the active/rewarded Durable Object, import/export, LiteREST, handler, worker, operation, cache, RLS, allowlist, plugin registry, stats, cron/resend, and API response coverage PRs.

Validation

  • .\node_modules\.bin\prettier.CMD --write plugins\sql-macros\index.ts plugins\sql-macros\index.test.ts - passed
  • .\node_modules\.bin\vitest.CMD run plugins\sql-macros\index.test.ts --coverage.enabled true --coverage.include plugins/sql-macros/index.ts --coverage.reporter text --coverage.reportsDirectory coverage-sql-macros - passed; plugins/sql-macros/index.ts reports 91.93% statements, 85.29% branches, 100% functions, 91.8% lines
  • git diff --check - passed

No UI demo video is included because this is plugin/unit-test coverage with no visible UI behavior.

AI-assisted with Codex; I reviewed the diff and kept the scope to this SQL macros coverage/fix slice.

@mt211211 mt211211 closed this by deleting the head repository Jun 14, 2026
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