test: simplify temporary test fixtures - #130
Conversation
Deploying rstack-cli with
|
| Latest commit: |
f47c136
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://87d0dcd6.rstack-cli.pages.dev |
| Branch Preview URL: | https://chenjiahan-test-cleanup-temp.rstack-cli.pages.dev |
📝 WalkthroughWalkthroughThe changes isolate temporary test projects from repository discovery and Rstest collection. Shared formatting helpers now create Git-backed projects, write fixture files, and clean up directories. Formatting tests use these helpers instead of local implementations. CLI and setup tests create local temporary directories and configure Git ceiling boundaries. Minor test helpers and config reload setup were simplified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/rstack/tests/setup/helpers.ts`:
- Around line 24-32: Sanitize inherited explicit Git repository variables in
both isolated test environments: update the fixture setup around the
GIT_CEILING_DIRECTORIES preservation in
packages/rstack/tests/setup/helpers.ts:24-32 and the corresponding setup in
packages/rstack/tests/cli/setup/index.test.ts:32-36 to remove or temporarily
sanitize those variables, while retaining restoreEnv-based restoration of
GIT_CEILING_DIRECTORIES and all modified environment state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 54ce8d03-bab5-43c7-a677-bf32b234e6ed
📒 Files selected for processing (14)
packages/rstack/rstack.config.tspackages/rstack/tests/cli/fmt/index.test.tspackages/rstack/tests/cli/setup/index.test.tspackages/rstack/tests/cli/staged/fmt.test.tspackages/rstack/tests/config/reload-app-config/index.test.tspackages/rstack/tests/exports/lint-subpath/index.test.tspackages/rstack/tests/exports/test-subpath/index.test.tspackages/rstack/tests/fmt/discoverPaths.test.tspackages/rstack/tests/fmt/discovery.test.tspackages/rstack/tests/fmt/helpers.tspackages/rstack/tests/fmt/runner.test.tspackages/rstack/tests/helpers/cliTest.tspackages/rstack/tests/setup/helpers.tspackages/rstack/tests/setup/hooks.test.ts
💤 Files with no reviewable changes (2)
- packages/rstack/tests/exports/lint-subpath/index.test.ts
- packages/rstack/tests/exports/test-subpath/index.test.ts
Summary
This PR simplifies test fixture setup and keeps temporary projects in local, Git-ignored
test-temp-*directories. It consolidates shared fmt helpers, removes redundant test logic, and isolates temporary projects from parent Git and Rstest discovery.