Repository navigation
test(vitest): expand test coverage across allowlist, sql-macros, and resend plugins (#71) - #354
Closed
Hidayat666-ali wants to merge 1 commit into
Closed
Hidayat666-ali wants to merge 1 commit into
Hidayat666-ali wants to merge 1 commit into
Conversation
…resend plugins (outerbase#71) Resolves outerbase#71 /claim outerbase#71
Author
|
Closing this PR in favor of earlier contributor submissions—apologies for the duplicate PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #71.
/claim #71
This PR delivers comprehensive Vitest test coverage across previously untested core modules and plugins as requested in #71:
What Was Done:
src/allowlist/index.test.ts):isEnabled: false), administrative role bypass (config.role: 'admin'), exact AST query matches, and trailing semicolon/whitespace normalization.tmp_allowlist_rejections, and multi-source isolation.src/allowlist/index.tswhere empty SQL previously returned anErrorobject rather than throwing it (returning truthy values allows queries through); it now throws consistently.plugins/resend/index.test.ts):ResendPlugincovering initialization with/without options, Bearer authentication headers, request body serialization, and error handling for non-ok API responses and fallback error messages.plugins/sql-macros/index.test.ts):SqlMacrosPlugincoveringpreventSelectStarenforcement on non-admin users and admin bypass.$_excludecolumn macro replacement with internal SQLitepragma_table_infocolumns and non-internal data source pass-through.Verification: