Repository navigation
fix(web): stop the card controls test mock leaking into the issue card suite - #398
Merged
Merged
Conversation
…d suite card-controls.test.tsx replaced the whole workspace provider module with a single useWorkspace export and never restored it. bun keeps module mocks for the rest of the process, so whichever file loaded the provider next lost statesForTeam and the seven IssueCard tests failed with states.filter on undefined. Which file ran next depended on directory order, which is why main and every pull request went red at random this week. The mock now spreads the real module, carries an empty states list and is restored after the file. The issue card suite mocks the provider itself with the real hook so it no longer depends on what ran before it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_011VF2UUVK1HnXDdyf64eDiE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Comment |
This branch was successfully deployed
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.
What this changes
apps/web/tests/features/issues/card-controls.test.tsxmockedworkspace-providerwith a singleuseWorkspaceexport and never restored it. Bun keeps a module mock for the rest of the process, so whichever test file loaded the provider next loststatesForTeam, and the sevenIssueCardtests failed withstates.filteron undefined. Which file came next depended on directory order, which is whymain(3170e754) and every open pull request went red on the same seven tests this week while nothing touched that code.The mock now spreads the real module, carries an empty
stateslist, and is restored after the file.issue-card.test.tsxmocks the provider itself with the real hook so it no longer depends on what ran before it.How you know it works
card-controls.test.tsxfollowed byissue-card.test.tsxin one process reproduced the failure before the change and passes after it (18/18).tests/features/issuespasses: 336 tests across 28 files. One 20s timeout on the reviewer cap dialog test under the full directory run passes on its own and is unrelated.Checklist
any, no non-null assertions🤖 Generated with Claude Code
https://claude.ai/code/session_011VF2UUVK1HnXDdyf64eDiE
Greptile Summary
This PR isolates workspace-provider mocks in the issue test suites so test behavior does not depend on file execution order.
Confidence Score: 5/5
The PR appears safe to merge with no actionable defects identified.
The changed mocks preserve complete provider exports, supply the workspace fields used by the tests, and are isolated under the repository’s pinned test runtime.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(web): stop the card controls test mo..." | Re-trigger Greptile