Skip to content

test(angular-query-experimental/injectIsRestoring): add test for resolving 'provideIsRestoring' value with 'injector' option#10599

Merged
sukvvon merged 1 commit intomainfrom
test/angular-query-inject-is-restoring-add-injector-option-resolve-test
Apr 28, 2026
Merged

test(angular-query-experimental/injectIsRestoring): add test for resolving 'provideIsRestoring' value with 'injector' option#10599
sukvvon merged 1 commit intomainfrom
test/angular-query-inject-is-restoring-add-injector-option-resolve-test

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 27, 2026

🎯 Changes

Add a test that verifies injectIsRestoring resolves the value provided via provideIsRestoring when the injector option is used (i.e., outside an injection context).

The existing tests covered:

  • ✅ Default false inside injection context
  • ✅ Provided signal value inside injection context
  • ✅ Reactivity inside injection context
  • ✅ Default false with injector option (outside injection context)

The missing matrix cell — provided signal value with injector option — is now covered. This guarantees the injector.get(IS_RESTORING) path correctly resolves through the user-registered DI tree, not just the default factory.

✅ 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
    • Enhanced test coverage for the injectIsRestoring utility with additional validation of the injector option path configuration.

…lving 'provideIsRestoring' value with 'injector' option
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f9aefd19-2eab-4fdd-a6d0-14adf24d5af5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a new test case to the injectIsRestoring test suite, validating that the injector option works correctly when explicitly provided. The test verifies that a provided signal is properly consumed through the injector context.

Changes

Cohort / File(s) Summary
Test Coverage Addition
packages/angular-query-experimental/src/__tests__/inject-is-restoring.test.ts
Adds a new test scenario (+14 lines) validating the injector option path for injectIsRestoring, ensuring the function correctly handles signals when an injector is explicitly provided.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

package: angular-query-experimental

Poem

🐰 With whiskers twitching, tests take flight,
An injector path now shining bright,
Where signals dance in contexts deep,
One more assurance in our keep! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the test being added: verifying injectIsRestoring resolves values provided via provideIsRestoring when using the injector option.
Description check ✅ Passed The description follows the template structure with all required sections completed: clear explanation of changes, filled checklist items, and appropriate release impact designation.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/angular-query-inject-is-restoring-add-injector-option-resolve-test

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

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

nx-cloud Bot commented Apr 27, 2026

View your CI Pipeline Execution ↗ for commit fdcc540

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

☁️ Nx Cloud last updated this comment at 2026-04-28 15:47:19 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

🚀 Changeset Version Preview

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

@sukvvon sukvvon marked this pull request as draft April 27, 2026 12:54
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: fdcc540

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

size-limit report 📦

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

@sukvvon sukvvon force-pushed the test/angular-query-inject-is-restoring-add-injector-option-resolve-test branch from 2074bc3 to fdcc540 Compare April 28, 2026 15:45
@sukvvon sukvvon marked this pull request as ready for review April 28, 2026 15:48
@sukvvon sukvvon merged commit f88a608 into main Apr 28, 2026
21 of 24 checks passed
@sukvvon sukvvon deleted the test/angular-query-inject-is-restoring-add-injector-option-resolve-test branch April 28, 2026 15:48
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