Repository navigation
feat(test): load project configs through Rstest PROJECT_LOADER - #600
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying rstack-cli with
|
| Latest commit: |
ac6e867
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2ba872f1.rstack-cli.pages.dev |
| Branch Preview URL: | https://feat-test-project-loader.rstack-cli.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Rstest 0.12.5 added a host-facing
PROJECT_LOADERhook (web-infra-dev/rstest#1963) that lets a host resolve stringprojectsentries itself. Rstack CLI passed those entries to Rstest unchanged, so an external project's test configuration only came fromrstest.config.*and its ownrstack.config.*was ignored. Rstack CLI does not read native tool config files anywhere else, so this made multi-project setups inconsistent.Changes
define.test({ projects })resolve from each project's ownrstack.config.*. A project without a Rstack config becomes an empty project with Rstest defaults, andrstest.config.*is never loaded for projects.process.cwd().filePathand the config dependencies, so Rstest dedupes projects across directory/file entries and watch mode restarts when a project config changes.loadRstackConfigacceptsconfigFilePath: nullto searchcwdand ignore the CLI--configpath.@rstest/coreto~0.12.5, document the behavior in the Testing and Configuration guides (en/zh), and add aproject-loaderintegration fixture.Validated with
pnpm checkandpnpm --filter rstack test.