Thanks for that you are interested in contributing to Rstest. Before starting your contribution, please take a moment to read the following guidelines.
Use fnm or nvm to run the command below. This will switch to the Node.js version specified in the project's .nvmrc file.
# with fnm
fnm use
# with nvm
nvm useEnable pnpm with corepack:
corepack enableInstall dependencies:
pnpm installWhat this will do:
- Install all dependencies.
- Create symlinks between packages in the monorepo
- Run the prepare script to build all packages.
Once you have set up the local development environment in your forked repository, we can start development.
It is recommended to develop on a new branch, as it will make things easier later when you submit a pull request:
git checkout -b MY_BRANCH_NAMEUse pnpm to build a specific package:
pnpm --filter @rstest/core run buildBuild all packages:
pnpm run buildYou can also use the watch mode to automatically rebuild the package when you make changes:
pnpm --filter @rstest/core run build --watchRun unit tests:
pnpm testRun e2e tests:
pnpm e2eBrowser-mode e2e fixtures set headless: true in their rstest.config.ts so no browser windows pop up locally. A few headed smoke tests (tests that explicitly need a visible browser, e.g. viewport assertions) are skipped locally by default and only run on CI. Run them from the e2e/ directory, for example:
cd e2e && RSTEST_E2E_RUN_HEADED=true pnpm test browser-mode/basic.test.tsRepository maintainers can publish new versions of changed packages.
- Run the local release command
pnpm bumpto bump the target package group. - The command will prompt for a package group and then a bump type. It creates a local commit only (no tag, no push).
- Open a pull request with a title like
release: 0.7.10orrelease: @rstest/coverage-istanbul 0.1.7and ensure CI passes. - Trigger the release action to publish packages to npm.
- Merge the release pull request to
main. - Create a GitHub Release for the merged commit so GitHub generates release notes and creates the version tag.