Skip to content

test(angular-query-experimental/injectQuery): add test for 'select' option transforming 'queryFn' data#10586

Merged
sukvvon merged 1 commit intomainfrom
test/angular-query-inject-query-add-select-test
Apr 26, 2026
Merged

test(angular-query-experimental/injectQuery): add test for 'select' option transforming 'queryFn' data#10586
sukvvon merged 1 commit intomainfrom
test/angular-query-inject-query-add-select-test

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 26, 2026

🎯 Changes

Add a test for the select option of injectQuery that verifies queryFn data is transformed before being exposed via the data() signal. Aligns with the existing react-query coverage for select and locks the contract that select runs after queryFn resolves.

✅ 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

  • Tests
    • Added test coverage for the select option in injectQuery to verify proper data transformation during query execution and change detection.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 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: dafb9f18-ec48-4e43-9703-71bec88ca103

📥 Commits

Reviewing files that changed from the base of the PR and between 20fc6c2 and 1b7654a.

📒 Files selected for processing (1)
  • packages/angular-query-experimental/src/__tests__/inject-query.test.ts

📝 Walkthrough

Walkthrough

A new test case is added to verify that injectQuery supports the select option for data transformation. The test renders a component, asserts the initial selected value, advances timers, triggers change detection, and validates the final selected value.

Changes

Cohort / File(s) Summary
Query Select Option Test
packages/angular-query-experimental/src/__tests__/inject-query.test.ts
New test case verifying injectQuery supports the select option for transforming fetched data, including async timing and Angular change detection scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A test hops in with whiskers held high,
Selecting data as queries fly,
With timers advanced and change detection true,
The value transforms from none to new! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a test for the 'select' option in injectQuery that verifies data transformation.
Description check ✅ Passed The description follows the template structure with all required sections completed: Changes section explains the test purpose, Checklist items are marked appropriately, and Release Impact correctly identifies this as dev-only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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/angular-query-inject-query-add-select-test

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

@sukvvon sukvvon self-assigned this Apr 26, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 26, 2026

View your CI Pipeline Execution ↗ for commit 1b7654a

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

☁️ Nx Cloud last updated this comment at 2026-04-26 05:19:34 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 26, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 1b7654a

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.1 KB (0%)
react minimal 9.07 KB (0%)

@sukvvon sukvvon merged commit 4f37369 into main Apr 26, 2026
10 checks passed
@sukvvon sukvvon deleted the test/angular-query-inject-query-add-select-test branch April 26, 2026 05:21
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