test(react-query): use test-d file for useMutationState#9075
Merged
manudeli merged 2 commits intoTanStack:mainfrom Apr 28, 2025
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit 51b378e.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9075 +/- ##
===========================================
+ Coverage 44.58% 84.22% +39.64%
===========================================
Files 203 26 -177
Lines 8104 374 -7730
Branches 1801 111 -1690
===========================================
- Hits 3613 315 -3298
+ Misses 4059 50 -4009
+ Partials 432 9 -423
🚀 New features to boost your workflow:
|
manudeli
commented
Apr 27, 2025
| } | ||
| } | ||
|
|
||
| export const doNotExecute = (_func: () => void) => true |
Collaborator
Author
There was a problem hiding this comment.
We can remove this
There was a problem hiding this comment.
Pull Request Overview
This PR updates testing for useMutationState by removing the redundant doNotExecute helper and shifting type validation tests to a new test-d file.
- Removed unused doNotExecute helper from utils.tsx
- Updated useMutationState.test.tsx by removing type tests wrapped in doNotExecute
- Added a new file (useMutationState.test-d.tsx) containing type inference tests for useMutationState
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react-query/src/tests/utils.tsx | Removed the redundant doNotExecute helper function |
| packages/react-query/src/tests/useMutationState.test.tsx | Cleaned up imports and removed redundant type tests |
| packages/react-query/src/tests/useMutationState.test-d.tsx | Introduced dedicated type tests for useMutationState |
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.
No description provided.