fix: Fix test mocking by deferring env var access#115
fix: Fix test mocking by deferring env var access#115gpailler merged 1 commit intoScoopInstaller:mainfrom
Conversation
- Move VITE_APP_AZURESEARCH_* from module level to function body - Allows vi.stubEnv() to properly override environment variables in tests - Resolves timing issue where GitHub Actions empty string env prevented mocking
WalkthroughEnvironment variable reads for Azure Search configuration were relocated from module initialization scope into the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable poems in the walkthrough.Disable the |
Changes
VITE_APP_AZURESEARCH_*from module level to function body.Summary by CodeRabbit