Skip to content

test(svelte-query/createQuery): move test files into 'createQuery' directory#10441

Merged
sukvvon merged 1 commit intomainfrom
test/svelte-query-createQuery-move-tests
Apr 10, 2026
Merged

test(svelte-query/createQuery): move test files into 'createQuery' directory#10441
sukvvon merged 1 commit intomainfrom
test/svelte-query-createQuery-move-tests

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 10, 2026

🎯 Changes

✅ 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
    • Reorganized and significantly expanded test suite with comprehensive coverage of query behavior, including state transitions, refetch mechanics, caching strategies, and error scenarios.
    • Updated test infrastructure with improved utilities and per-test isolation for enhanced reliability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 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: b7faaf09-acf3-4b71-ae73-f6f2ee77fbc7

📥 Commits

Reviewing files that changed from the base of the PR and between d45ec4d and a6c92d2.

📒 Files selected for processing (3)
  • packages/svelte-query/tests/createQuery.svelte.test.ts
  • packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts
  • packages/svelte-query/tests/createQuery/createQuery.test-d.ts
💤 Files with no reviewable changes (1)
  • packages/svelte-query/tests/createQuery.svelte.test.ts

📝 Walkthrough

Walkthrough

The pull request reorganizes and expands the createQuery test suite for svelte-query. One monolithic test file was removed while a new structured test file in a subdirectory was significantly expanded with comprehensive test coverage, and an import path in a TypeScript declaration test was corrected.

Changes

Cohort / File(s) Summary
Removed test file
packages/svelte-query/tests/createQuery.svelte.test.ts
Deleted entire test suite covering createQuery behavior including state transitions, promise identity, fetching semantics, refetch cancellation, query defaults, garbage collection, rerender prevention, and related query configurations.
Expanded test suite
packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts
Substantially extended test coverage with new cases for query state transitions, isFetchedAfterMount, refetch behavior, mounting/remounting with gcTime, invalidation, disable/enable semantics, selector errors, query removal, key changes, and placeholder data handling. Updated test harness to use withEffectRoot utilities and flushSync for state propagation, introduced per-test QueryClient instances, and enhanced type assertions.
Import path update
packages/svelte-query/tests/createQuery/createQuery.test-d.ts
Corrected TypeScript declaration test import path from ../src/index.js to ../../src/index.js to reference the correct module.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

package: svelte-query

Poem

🐰 A rabbit hops through tests anew,
Old files fade, fresh coverage grew,
Queries dance in structured play,
With assertions bright as day,
Each test case checks the way! 🧪✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary change: moving test files into a 'createQuery' directory, which aligns with the actual file reorganization shown in the changeset.
Description check ✅ Passed The description follows the template structure and provides clear details about the changes, includes completed checklist items, and correctly identifies the release impact as dev-only.
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/svelte-query-createQuery-move-tests

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

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

nx-cloud bot commented Apr 10, 2026

View your CI Pipeline Execution ↗ for commit a6c92d2

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

☁️ Nx Cloud last updated this comment at 2026-04-10 03:11:29 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 10, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: a6c92d2

@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 merged commit 5048e86 into main Apr 10, 2026
10 checks passed
@sukvvon sukvvon deleted the test/svelte-query-createQuery-move-tests branch April 10, 2026 03: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.

2 participants