test(query-core): align mutation test filenames with 'mutation.ts' by renaming and merging duplicate '.test-d' files - #11258
Conversation
… renaming and merging duplicate '.test-d' files
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe PR adds compile-time tests for ChangesMutation tests
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This test-only change aligns mutation test filenames and preserves the existing cases, with no published or runtime behavior changes. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit b3394b7
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
Every other observer/cache module in
query-corehas its test file(s) named exactly after the source module (query.ts→query.test.tsx,queryObserver.ts→queryObserver.test.tsx+queryObserver.test-d.tsx,mutationCache.ts→mutationCache.test.tsx, etc.).mutation.tswas the one exception, split across two misnamed/duplicated files:mutations.test.tsx(plural, should bemutation.test.tsx) → renamed tomutation.test.tsx, and its top-leveldescribe('mutations', ...)renamed todescribe('mutation', ...)to match the file.mutations.test-d.tsxwas a second.test-dfile for the same source module (every other module has exactly one). Itsdescribe('MutateFunction', ...)block (12 cases, including the nesteddescribe('compatible with spread arguments pattern', ...)) was moved as-is intomutation.test-d.tsx, as a sibling of the existingdescribe('onMutate', ...)block. No cases were changed or dropped —mutation.test-d.tsxnow runs 16 tests (4 existingonMutate+ 12 movedMutateFunction), same as the sum before the merge.mutations.test-d.tsxis deleted.Test-only change, no runtime code touched.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit