Skip to content

feat(rstest): add playwright and Module Federation examples - #506

Merged
fi3ework merged 2 commits into
rstackjs:mainfrom
fi3ework:feat/rstest-examples
Sep 15, 2026
Merged

fi3ework merged 2 commits into
rstackjs:mainfrom
fi3ework:feat/rstest-examples

Conversation

@fi3ework

@fi3ework fi3ework commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

Adds three Rstest examples for the features highlighted in the Rstest 0.12 announcement, using the currently published 0.11.x packages:

  • rstest/playwright: end-to-end testing a Rsbuild + React app with @rstest/playwright.
  • rstest/module-federation-node: testing a local CommonJS Module Federation remote (built with Rslib's mf format) with @module-federation/rstest, no HTTP server.
  • rstest/module-federation-browser: testing a federated React component in Rstest Browser Mode; the Rslib-built remote is served by globalSetup.

Also adds Rstest to the root README project list.

Verification

  • pnpm test passes in all three examples (Node 24, pnpm 10).
  • tsc --noEmit passes in every package; rs fmt / rs lint clean.

- rstest/playwright: E2E testing a Rsbuild + React app with @rstest/playwright
- rstest/module-federation-node: test a local CommonJS Module Federation remote built by Rslib, no HTTP server
- rstest/module-federation-browser: test a federated React component in Rstest Browser Mode, remote served by globalSetup
- README: add Rstest to the project list
@chatgpt-codex-connector

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 🔄 Running since 2026-09-15T09:20:56.839961Z d1c3236 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

"test": "pnpm run build && rstest"

P1 Badge Provision Chromium before running this test in CI

When this script is reached through the root test:rstest command on GitHub Actions, @rstest/playwright starts without an installed Playwright browser: .github/workflows/ci.yaml lines 31–38 only install dependencies before node --run test, while this package's own README requires the separate pnpm exec playwright install chromium step. Unlike the browser-mode examples, this test also has no CI override to launch the runner's preinstalled Chrome, so a fresh CI runner fails before reaching the assertions; install Chromium in the workflow or configure this fixture to use Chrome.



P2 Badge Install the remote in the standalone browser example

When rstest/module-federation-browser is cloned or copied as a standalone example, this command installs only host/: the example root has no workspace manifest and the host does not declare the sibling remote as a dependency. Consequently the remote's prepare script never builds remote/dist/mf/remoteEntry.js, and global-setup.ts aborts the documented pnpm test command. The instructions or package scripts need to install and build ../remote independently of the repository-level workspace.

AGENTS.md reference: AGENTS.md:L82-L82



P2 Badge Install the remote in the standalone Node example

When rstest/module-federation-node is cloned or copied by itself, running this documented command from host/ never installs the sibling remote because there is no workspace manifest at the example root and no dependency connecting the packages. The subsequent test therefore resolves a nonexistent ../remote/dist/mf/remoteEntry.cjs; make the setup install/build the remote so the example can run outside the monorepo workspace.

AGENTS.md reference: AGENTS.md:L82-L82

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fi3ework
fi3ework merged commit 0159679 into rstackjs:main Sep 15, 2026
1 check passed
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.

1 participant