test(vue-query-devtools): set up vitest environment with production fallback test#10629
test(vue-query-devtools): set up vitest environment with production fallback test#10629
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds Vitest test setup to the vue-query-devtools package: new test scripts, a Vitest ChangesVitest test infra + production-smoke tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit f658265
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
|
CI's CI run: https://github.com/TanStack/query/actions/runs/25282211546/job/74121119451 |
🎯 Changes
Set up the vitest environment for
vue-query-devtoolsand add tests covering the production fallback inindex.ts.vite.config.tsto usedefineConfigfromvitest/configand add atestblock withjsdomenvironment.test:lib/test:lib:devscripts topackage.json.VueQueryDevtools.test.tsandVueQueryDevtoolsPanel.test.ts, each with ashould return null in non-development environmentscase that usesvi.stubEnv('NODE_ENV', 'production')+vi.resetModules()+try/finallycleanup for deterministic verification.The tests verify only the
index.tsproduction fallback (no SFC mount), so no@testing-library/vueis introduced. This mirrors the deterministic env pattern used inreact-query-devtools(#10627) andpreact-query-devtools(#10628).✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Tests
Chores