Repository navigation
fix(web): vitest 4 compatible fetch spy in recipes.test - #42
Conversation
…ld after vitest 4.1.0 bump) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates Vitest mock spy targets in the recipes test file from ChangesFetch Mock Target Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 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 |
Summary
origin/maincurrently failspnpm testafter the vitest 4.1.0 bump.recipes.test.tscasts the fetch spy withvi.spyOn(global, "fetch" as never), which vitest 4's stricter typings reject, breaking the build.This swaps the four occurrences to
vi.spyOn(globalThis, "fetch"), which type-checks cleanly under vitest 4 and is the idiomatic form.Isolated hotfix — no behavior change, one file, four lines. Splitting it out so the broken
mainis un-blocked independently of any in-flight feature work.Test Plan
cd web && pnpm exec vitest run src/lib/recipes.test.ts→ 3/3 pass on vitest 4.1.0🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
No user-facing changes in this release. This update includes internal testing infrastructure improvements with no impact on functionality or user experience.