Skip to content

test({react,preact}-query/useSuspenseQueries): merge redundant second 'describe' block into first#10362

Merged
sukvvon merged 1 commit intomainfrom
test/react-preact-query-merge-use-suspense-queries-describe
Mar 31, 2026
Merged

test({react,preact}-query/useSuspenseQueries): merge redundant second 'describe' block into first#10362
sukvvon merged 1 commit intomainfrom
test/react-preact-query-merge-use-suspense-queries-describe

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Mar 31, 2026

🎯 Changes

The useSuspenseQueries test file had two separate describe('useSuspenseQueries') blocks — the second one (useSuspenseQueries 2) was introduced in #10352 but was unnecessarily split. Since both blocks test the same hook with the same setup, they are merged into a single describe block.

✅ 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
    • Simplified test suite structure by removing duplicate test configuration blocks.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 31, 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: 944b09fa-3f3d-48c1-8682-cc503f9dfda5

📥 Commits

Reviewing files that changed from the base of the PR and between f168555 and 51cc1bb.

📒 Files selected for processing (2)
  • packages/preact-query/src/__tests__/useSuspenseQueries.test.tsx
  • packages/react-query/src/__tests__/useSuspenseQueries.test.tsx
💤 Files with no reviewable changes (2)
  • packages/preact-query/src/tests/useSuspenseQueries.test.tsx
  • packages/react-query/src/tests/useSuspenseQueries.test.tsx

📝 Walkthrough

Walkthrough

Removed a describe block (useSuspenseQueries 2) from test files in both preact-query and react-query packages, including its local queryClient setup/teardown with fake timers. A standalone parallel query suspension test remains but is no longer nested within that dedicated suite scope.

Changes

Cohort / File(s) Summary
Test Suite Cleanup
packages/preact-query/src/__tests__/useSuspenseQueries.test.tsx, packages/react-query/src/__tests__/useSuspenseQueries.test.tsx
Removed nested describe('useSuspenseQueries 2', ...) block including local queryClient instantiation, fake timer setup/teardown, and associated test grouping. Remaining tests no longer have the separate lifecycle scope.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

package: react-query, package: preact-query

Poem

🐰 Tests once nested, now set free,
Describe blocks hopped right off the tree,
Timers reset, cleanup done with care,
Simpler suites now breathe fresh air! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: merging redundant second describe blocks in useSuspenseQueries tests for both react-query and preact-query packages.
Description check ✅ Passed The description covers the changes clearly, explains the motivation (removing redundancy), follows the template structure, and correctly marks this as a dev-only change requiring no changeset.
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/react-preact-query-merge-use-suspense-queries-describe

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 31, 2026

View your CI Pipeline Execution ↗ for commit 51cc1bb

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

☁️ Nx Cloud last updated this comment at 2026-03-31 06:17:14 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 Mar 31, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 51cc1bb

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 9.01 KB (0%)

@sukvvon sukvvon merged commit fd8c068 into main Mar 31, 2026
10 checks passed
@sukvvon sukvvon deleted the test/react-preact-query-merge-use-suspense-queries-describe branch March 31, 2026 06:19
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