Skip to content

test(vue-query/mutationOptions): add identity tests for getter overloads#10468

Merged
sukvvon merged 1 commit intomainfrom
test/vue-query-mutationOptions-getter-identity
Apr 13, 2026
Merged

test(vue-query/mutationOptions): add identity tests for getter overloads#10468
sukvvon merged 1 commit intomainfrom
test/vue-query-mutationOptions-getter-identity

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 13, 2026

🎯 Changes

  • Add 2 identity tests for mutationOptions getter overloads:
    • should return the getter received as a parameter without any modification (with mutationKey in mutationOptions): verifies mutationOptions(getter) returns the same function reference using toBe
    • should return the getter received as a parameter without any modification (without mutationKey in mutationOptions): same without mutationKey

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

Release Notes

  • Tests
    • Added test coverage to verify mutation options behavior with and without mutation keys.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f24b820-d68e-4e92-bfb8-329798a10658

📥 Commits

Reviewing files that changed from the base of the PR and between 6384368 and 2ed342e.

📒 Files selected for processing (1)
  • packages/vue-query/src/__tests__/mutationOptions.test.ts

📝 Walkthrough

Walkthrough

Two new test assertions were added to verify that mutationOptions returns the provided getter function by reference without modification, testing both scenarios with and without mutationKey present. No production code was altered.

Changes

Cohort / File(s) Summary
Test Assertions
packages/vue-query/src/__tests__/mutationOptions.test.ts
Added two test cases verifying that mutationOptions returns the provided getter function by reference without wrapping, cloning, or modification—one with mutationKey and one without.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hop, hop, the mutations align,
With getters that reference, by design,
No clones, no wraps, just truth so pure,
These tests make the behavior secure!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding identity tests for mutationOptions getter overloads in the vue-query package.
Description check ✅ Passed The description follows the template structure, includes details about the changes, confirms checklist items, and correctly marks the change as dev-only with no release impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/vue-query-mutationOptions-getter-identity

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 13, 2026

View your CI Pipeline Execution ↗ for commit 2ed342e

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 39s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-13 01:42:04 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 13, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10468

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10468

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10468

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10468

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10468

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10468

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10468

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10468

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10468

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10468

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10468

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10468

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10468

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10468

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10468

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10468

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10468

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10468

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10468

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10468

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10468

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10468

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10468

commit: 2ed342e

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.99 KB (0%)
react minimal 9.02 KB (0%)

@sukvvon sukvvon self-assigned this Apr 13, 2026
@sukvvon sukvvon merged commit 7d3b86c into main Apr 13, 2026
10 checks passed
@sukvvon sukvvon deleted the test/vue-query-mutationOptions-getter-identity branch April 13, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant