Skip to content

test(svelte-query): remove 'Example' suffix from test component file names and rename 'QueryChild' to 'Child'#10480

Merged
sukvvon merged 1 commit intomainfrom
test/svelte-query-remove-Example-suffix-from-test-components
Apr 13, 2026
Merged

test(svelte-query): remove 'Example' suffix from test component file names and rename 'QueryChild' to 'Child'#10480
sukvvon merged 1 commit intomainfrom
test/svelte-query-remove-Example-suffix-from-test-components

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 13, 2026

🎯 Changes

  • Remove Example suffix from all 17 Svelte test component file names
    • BaseExample.svelteBase.svelte
    • SelectExample.svelteSelect.svelte
    • IsRestoringExample.svelteIsRestoring.svelte
    • ChangeClientExample.svelteChangeClient.svelte
    • FailureExample.svelteFailure.svelte
    • ResetExample.svelteReset.svelte
    • SuccessExample.svelteSuccess.svelte
    • MultiExample.svelteMulti.svelte
  • Rename QueryChild.svelte to Child.svelte for consistency with Base.svelte
  • Update all corresponding imports in 11 test files and 1 component file
  • The Example suffix is not a common convention in the Svelte ecosystem — test directories already provide sufficient context

✅ 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
    • Refactored test fixture components to improve organization and consistency across test suites.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 13, 2026

View your CI Pipeline Execution ↗ for commit 51cb77a

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

☁️ Nx Cloud last updated this comment at 2026-04-13 14:37:53 UTC

@sukvvon sukvvon self-assigned this Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

🚀 Changeset Version Preview

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

size-limit report 📦

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

📝 Walkthrough

Walkthrough

Multiple svelte-query test files were updated to import and render renamed fixture components: files previously importing *Example.svelte now import the same components without the Example suffix; only test imports and render() targets changed, test logic and assertions left intact.

Changes

Cohort / File(s) Summary
Base component migration
packages/svelte-query/tests/HydrationBoundary/HydrationBoundary.svelte.test.ts, packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.svelte.test.ts, packages/svelte-query/tests/context/context.svelte.test.ts, packages/svelte-query/tests/useIsFetching/useIsFetching.svelte.test.ts, packages/svelte-query/tests/useIsMutating/useIsMutating.svelte.test.ts
Import and render Base.svelte (was BaseExample.svelte). No changes to test logic, timers, or assertions.
IsRestoring component migration
packages/svelte-query/tests/createQueries/createQueries.svelte.test.ts, packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts
Replace IsRestoringExample.svelte with IsRestoring.svelte in imports and renders. Assertions about status/fetchStatus/data unchanged.
createInfiniteQuery / multi fixtures
packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.svelte.test.ts, packages/svelte-query/tests/mutationOptions/mutationOptions.svelte.test.ts
Swapped BaseExample.svelte, SelectExample.svelte, ChangeClientExample.svelte, MultiExample.svelteBase.svelte, Select.svelte, ChangeClient.svelte, Multi.svelte. Test flows and timing preserved.
createMutation fixture rename
packages/svelte-query/tests/createMutation/createMutation.svelte.test.ts
Replaced ResetExample, SuccessExample, FailureExample imports/renders with Reset, Success, Failure. Props and assertions unchanged.
useMutationState component update
packages/svelte-query/tests/useMutationState/useMutationState.svelte.test.ts
Replaced BaseExample.svelte/SelectExample.svelte with Base.svelte/Select.svelte. Test interactions and assertions unchanged.
QueryClientProvider test component tweak
packages/svelte-query/tests/QueryClientProvider/Base.svelte
Local test component now imports ./Child.svelte instead of ./QueryChild.svelte and uses <Child /> in markup. No other logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰✨ I hopped through tests with nimble paws,
Swapped "Example" names without a pause.
Base and Select now dance in rows,
Clean fixtures bloom where refactor goes. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the template with completed 🎯 Changes section listing all 17 file renames and import updates, completed ✅ Checklist with both items checked, and proper 🚀 Release Impact marking this as dev-only with no changeset needed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: renaming test component files by removing the 'Example' suffix and renaming 'QueryChild' to 'Child'.

✏️ 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-remove-Example-suffix-from-test-components

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

@sukvvon sukvvon marked this pull request as draft April 13, 2026 14:19
@sukvvon sukvvon force-pushed the test/svelte-query-remove-Example-suffix-from-test-components branch from bf9bc02 to 51cb77a Compare April 13, 2026 14:35
@sukvvon sukvvon marked this pull request as ready for review April 13, 2026 14:36
@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@10480

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 51cb77a

@sukvvon sukvvon changed the title test(svelte-query): remove 'Example' suffix from test component file names test(svelte-query): remove 'Example' suffix from test component file names and rename 'QueryChild' to 'Child' Apr 13, 2026
@sukvvon sukvvon merged commit 479b9a5 into main Apr 13, 2026
8 checks passed
@sukvvon sukvvon deleted the test/svelte-query-remove-Example-suffix-from-test-components branch April 13, 2026 14: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