test(solid-query-devtools): extract shared test setup into 'beforeEach'#11028
Conversation
|
View your CI Pipeline Execution ↗ for commit 221c01b
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTest suites in ChangesShared QueryClient Test Refactor
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Poem A rabbit hopped through tests anew, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
Removes the
const queryClient = new QueryClient()repeated in every test ofSolidQueryDevtoolsandSolidQueryDevtoolsPanelby hoisting it into abeforeEach, exposed via aletbinding.The per-test
vi.spyOn(TanstackQueryDevtools.prototype, ...)calls are left as-is: each test spies only the setter it asserts on, so they are intentionally not shared.No test behavior changes; all existing assertions are preserved.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit