Skip to content

test: cover sql macros plugin#178

Open
Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-sql-macros-coverage
Open

test: cover sql macros plugin#178
Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-sql-macros-coverage

Conversation

@Treasure520520
Copy link
Copy Markdown

/claim #71

Summary

  • add focused Vitest coverage for the SQL macros plugin
  • cover no-data-source passthrough, non-internal/pragma passthrough, non-admin SELECT * blocking, admin/disabled bypasses, $_exclude(...) expansion, multiple excluded columns, and parse-error fallback
  • fix two covered edge cases: node-sql-parser may return a single AST object instead of an array, and $_exclude(...) comparisons should handle excluded column names case-insensitively

Verification

  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec prettier --check plugins/sql-macros/index.ts plugins/sql-macros/index.test.ts
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest plugins/sql-macros/index.test.ts --run
  • git diff --check
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec tsc --noEmit --pretty false still reports existing repository errors in plugins/cdc, src/cache, src/do, and src/operation; no errors mention plugins/sql-macros
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest --run still reports the existing 4 RLS failures in src/rls/index.test.ts; the new SQL macros test file passes in the full run

Notes

This is a non-overlapping coverage slice for #71, separate from the Stripe, WebSocket, Clerk, and CDC plugin test PRs I submitted earlier.

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