Repository navigation
test(*): rename the 'queryKey' test helper to 'createKey' since it creates keys for both queries and mutations - #12293
Conversation
…eates keys for both queries and mutations
|
|
View your CI Pipeline Execution ↗ for commit b9d6815
☁️ 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
size-limit report 📦
|
… to 'key-' since it is also used for mutation keys
82cc028 to
b9d6815
Compare
🎯 Changes
The
queryKeyhelper in@tanstack/query-test-utilsis used for bothqueryKeyandmutationKey, so its name doesn't describe what it does and clashes with thequeryKeyoption and context property in tests.queryKey.tstocreateKey.tsand the helper tocreateKey, and update its JSDoc and tests.query_tokey-, since the keys are also used as mutation keys.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
createKey. Test suites across supported frameworks now use the updated helper, including type tests. The generated keys remain unique, and existing query and mutation behavior and test expectations are unchanged. The former helper is no longer available from the test utilities.