rstackjs avatar

Rstest Best Practices

This is a comprehensive reference for writing and maintaining Rstest test suites, covering everything from basic test APIs to advanced CI and performance tuning. You'll want this when setting up a new Rstest project, debugging flaky tests, or optimizing slow test runs. It includes adapter patterns for Rsbuild and Rslib, proper async assertion patterns (using resolves/rejects matchers instead of try/catch), and practical advice on sharding for parallel CI execution. The coverage of multi-project monorepo setup and the debugging section with Rsdoctor profiling tips are especially useful. One caveat: it assumes you're already committed to the Rstest ecosystem rather than comparing it to alternatives.

skills.sh installs
1.5K
GitHub stars
98
last updated
Aug 21, 2026

Install

$ npx -y skills add rstackjs/agent-skills --skill rstest-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

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 passWithNoTests unless 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.

Configuration and environments

Sponsors

Details

Repository
github.com/rstackjs/agent-skills
Categories
Frontend Development, Testing & QA, Documentation, AI & Agent Building, Debugging, Automation & Workflows, CLI & Terminal
First seen
Jun 3, 2026

More from rstackjs/agent-skills

All 12
1dimillian avatarmacos-spm-app-packagingdimillian/skillsScaffold, build, and package SwiftPM-based macOS apps without an Xcode project. Use when you need a from-scratch macOS app layout, SwiftPM targets/resources, a 1.4Kskills.sh installs
2neolabhq avatarthought-based-reasoningneolabhq/context-engineering-kitUse when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where s1.4Kskills.sh installs
3kostja94 avatarbrand-visual-generatorkostja94/marketing-skillsWhen the user wants to define, audit, or apply visual identity (typography, colors, spacing, design tokens, frontend aesthetics). Also use when the user mention1.4Kskills.sh installs
4customware-ai avatarcrm-buildercustomware-ai/skillsCustomer Relationship Management (CRM) vertical skill for the Customware SPA. Defines the section layout, entity views, and mapping rules for transforming a DOM1.4Kskills.sh installs
5quodsoler avatarue-niagara-effectsquodsoler/unreal-engine-skillsUse this skill when working with Niagara particle systems, VFX, effects, emitter, Niagara component, or Niagara parameter in Unreal Engine C++. Covers spawning 1.4Kskills.sh installs
6davila7 avatar3d-web-experiencedavila7/claude-code-templatesExpert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfoli1.4Kskills.sh installs