-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
test(react-query): use test-d file for useMutationState #9075
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? No Sign in to your account
test(react-query): use test-d file for useMutationState #9075
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:
|
@@ -92,5 +92,3 @@ export function setIsServer(isServer: boolean) { | |||
}) | |||
} | |||
} | |||
|
|||
export const doNotExecute = (_func: () => void) => true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
No description provided.