Repository navigation
fix(docs): scope vitest run to target dir in js-libs-update workflow - #44943
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA GitHub Actions workflow step was updated to run Vitest with a directory-based selection ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Braintrust eval report
|
…ned (#46737) The `Update JS Client Libraries Docs` workflow's "Refresh reference-content snapshot" step fails because `npx vitest run --update scripts/build-reference-content.test.ts` is treated as a filter, not a restriction, under Vitest 4, so all docs tests run. `CodeSample.test.ts` then fails with ENOENT on `apps/docs/examples/_internal/fixtures/*` because the workflow bypasses the `pretest` npm hook that runs `codegen:examples`. This is a regression of #44943 (commit 28ef62c), reintroduced by #46163 when the snapshot step was renamed and rewritten back to the file-path form. Fixes: - Workflow: use `--dir scripts` so only the snapshot test runs. - Tests: add a vitest globalSetup that mirrors `codegen:examples`, so `npx vitest`, `pnpm test:local`, and IDE single-test runs no longer depend on the `pretest` lifecycle hook being triggered first. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated test infrastructure configuration and initialization process for improved test suite management. * Refined test execution workflow to efficiently manage test discovery and execution across project directories. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Vitest 4 no longer restricts test execution when a file path is passed as a positional filter, causing all docs tests to run and fail on unrelated tests. Use --dir to scope to the target directory. PR #44833 made the update which broke the behaviour.
Summary by CodeRabbit