Schedule: Add unit and integration tests to app/actions/supabase/coverage/toggle-exclusion.ts#860
Merged
gitauto-ai[bot] merged 7 commits intomainfrom Apr 22, 2026
Conversation
Contributor
Author
|
Pull request completed! 🚀 I autonomously open pull requests on a schedule. You can manage your schedule here. Should you have any questions or wish to change settings or limits, please feel free to contact info@gitauto.ai or invite us to Slack Connect. |
Co-Authored-By: hiroshinishio <hiroshinishio@users.noreply.github.com>
…t.ts [skip ci] Co-Authored-By: hiroshinishio <hiroshinishio@users.noreply.github.com>
…t.ts [skip ci] Co-Authored-By: hiroshinishio <hiroshinishio@users.noreply.github.com>
…le-exclusion.integration.test.ts [skip ci] Co-Authored-By: hiroshinishio <hiroshinishio@users.noreply.github.com>
…le-exclusion.test.ts [skip ci] Co-Authored-By: hiroshinishio <hiroshinishio@users.noreply.github.com>
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.
Current Coverage for app/actions/supabase/coverage/toggle-exclusion.ts
Instructions
Focus on covering the uncovered areas.
Test these changes locally
What I Tested
I added unit tests in
toggle-exclusion.test.tsand integration tests intoggle-exclusion.integration.test.tsfor thetoggleExclusionfunction inapp/actions/supabase/coverage/toggle-exclusion.ts.Unit tests (mocked supabaseAdmin) cover: empty ids array returning 0 without hitting the DB, successful bulk update of
is_excluded_from_testingwith correctupdated_byformat (userId:userName), toggling to false, and DB error propagation withconsole.errorlogging.Integration tests hit a real Supabase instance via
supabaseAdmin, seeding and tearing downowners,repositories, andcoveragesrows per test. They cover: toggling multiple records to excluded and back, empty ids returning 0, and partial updates (only specified ids change, unspecified ids stay untouched).Potential Bugs Found
None found. The completion note mentions a TypeScript fix was applied (added the required
updated_byfield to coverage insert records in the integration test'sbeforeEach/test setup), meaning the implementation was not changed but the test data was corrected before merging.Non-Code Tasks
supabaseAdmin) to be available in the CI environment. ConfirmSUPABASE_SERVICE_ROLE_KEYandSUPABASE_URL(or equivalent) are set in the CI secrets before merging.Math.random()do not collide with real owner/repo IDs in the shared Supabase instance, especially if CI and production share the same database.