Skip to content

feat(test): load project configs through Rstest PROJECT_LOADER - #600

Merged
chenjiahan merged 1 commit into
mainfrom
feat-test-project-loader
Oct 30, 2026
Merged

chenjiahan merged 1 commit into
mainfrom
feat-test-project-loader

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Motivation

Rstest 0.12.5 added a host-facing PROJECT_LOADER hook (web-infra-dev/rstest#1963) that lets a host resolve string projects entries itself. Rstack CLI passed those entries to Rstest unchanged, so an external project's test configuration only came from rstest.config.* and its own rstack.config.* was ignored. Rstack CLI does not read native tool config files anywhere else, so this made multi-project setups inconsistent.

Changes

  • Attach a loader to the root Rstest config, so directory and file entries in define.test({ projects }) resolve from each project's own rstack.config.*. A project without a Rstack config becomes an empty project with Rstest defaults, and rstest.config.* is never loaded for projects.
  • Resolve each project's test configuration independently, including automatic app/lib inheritance. The Rslib adapter now receives the project directory, so decorator detection reads that project's tsconfig instead of process.cwd().
  • Return a normalized filePath and the config dependencies, so Rstest dedupes projects across directory/file entries and watch mode restarts when a project config changes.
  • loadRstackConfig accepts configFilePath: null to search cwd and ignore the CLI --config path.
  • Bump @rstest/core to ~0.12.5, document the behavior in the Testing and Configuration guides (en/zh), and add a project-loader integration fixture.

Validated with pnpm check and pnpm --filter rstack test.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T07:03:44.615083Z ac6e867 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

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

View logs

@chenjiahan chenjiahan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👏

@chenjiahan
chenjiahan merged commit 1dcbc24 into main Oct 30, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the feat-test-project-loader branch October 30, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants