rstest-best-practices
Installation
SKILL.md
Rstest best practices
Apply these rules when setting up, writing, or reviewing Rstest projects.
Workflow
- Inspect the existing package manager, dependency policy, module mode, build configuration, test layout, and framework conventions before editing.
- Add
@rstest/core, a package-local test script, and a config file whose extension matches the package's module mode. - Reuse existing build configuration only when doing so lowers maintenance cost and remains compatible. An adapter is optional; use an independent Rstest config when adapter integration is incompatible or disproportionately costly, and explicitly reproduce required aliases, plugins, defines, environments, and externals.
- Configure test discovery, environment, and setup files intentionally. Do not enable
passWithNoTestsunless an empty test set is an expected and documented state. - Verify test discovery with
rstest list, then run focused tests, the full suite, and the project's existing build or type-check command.