Skip to content

chore(query-devtools): set up '@solidjs/testing-library' for component tests#10678

Merged
sukvvon merged 1 commit intomainfrom
chore/query-devtools-set-up-component-test-environment
May 9, 2026
Merged

chore(query-devtools): set up '@solidjs/testing-library' for component tests#10678
sukvvon merged 1 commit intomainfrom
chore/query-devtools-set-up-component-test-environment

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented May 9, 2026

🎯 Changes

Set up the test environment for upcoming component tests in query-devtools.

  • Add @solidjs/testing-library to devDependencies (already used across solid-query, solid-query-persist-client, solid-query-devtools).
  • Add test-setup.ts to import @testing-library/jest-dom/vitest and call cleanup() from @solidjs/testing-library in afterEach.
  • Wire the setup file via setupFiles in vite.config.ts.
  • Include test-setup.ts in tsconfig.json so the matcher type augmentation is picked up.

✅ 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

  • Chores
    • Added testing library dependencies and configured test cleanup registration for the devtools package.
    • Updated build configuration to support improved testing infrastructure.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 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: ec6fe740-5bf2-45e3-ab96-87411164f14f

📥 Commits

Reviewing files that changed from the base of the PR and between 9963b2f and 8d25000.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • packages/query-devtools/package.json
  • packages/query-devtools/test-setup.ts
  • packages/query-devtools/tsconfig.json
  • packages/query-devtools/vite.config.ts

📝 Walkthrough

Walkthrough

This PR adds testing library infrastructure to packages/query-devtools by introducing the @solidjs/testing-library dependency, creating a test setup file that registers automatic cleanup hooks with Vitest, and configuring the setup file in vite and tsconfig.

Changes

Testing Infrastructure Setup

Layer / File(s) Summary
Testing Library Dependency
packages/query-devtools/package.json
@solidjs/testing-library (^0.8.10) added to devDependencies.
Test Setup Module
packages/query-devtools/test-setup.ts
New file imports Jest DOM matchers and registers Vitest afterEach hook to call cleanup() from Solid Testing Library.
Vitest Configuration
packages/query-devtools/vite.config.ts
setupFiles configuration added to reference test-setup.ts for automatic setup before tests run.
TypeScript Configuration
packages/query-devtools/tsconfig.json
The include array reformatted to multi-line for readability (no semantic changes).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A testing setup, neat and clean,
Vitest hooks to flush the scene,
Cleanup after every test,
Solid Testing Library does its best!
The devtools now stand ready, prepared—
For tests with Solid, properly cared! 🧪

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: setting up Solid Testing Library for component tests in query-devtools.
Description check ✅ Passed The description comprehensively covers all changes, explains the motivation, follows the template structure, and includes completed checklist items with appropriate release impact assessment.
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 chore/query-devtools-set-up-component-test-environment

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 9, 2026

View your CI Pipeline Execution ↗ for commit 8d25000

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

☁️ Nx Cloud last updated this comment at 2026-05-09 18:48:27 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

🚀 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 May 9, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@10678

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 8d25000

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

size-limit report 📦

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

@sukvvon sukvvon self-assigned this May 9, 2026
@sukvvon sukvvon merged commit 4731c07 into main May 9, 2026
10 checks passed
@sukvvon sukvvon deleted the chore/query-devtools-set-up-component-test-environment branch May 9, 2026 18:52
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