write-tests
Installation
SKILL.md
Write Tests
Overview
Write tests that prove behavior with the smallest useful fixture surface. Use Remix's own test/assert packages and describe/it style by default, keep package dependency graphs clean, and validate with the narrowest reliable commands.
Workflow
- Read the nearest
package.json,tsconfig.json, and existing sibling tests before choosing a runner or fixture style. - Identify whether the package can depend on
@remix-run/test, or whether it is a dependency of@remix-run/testand must avoid a circular dependency. - Keep the test close to the behavior owner. Prefer local helpers and direct Web/Node primitives over importing higher-level workspace packages as fixtures.
- Put test-only workspace packages in
devDependencieswithworkspace:^; do not add them to runtimedependencies. - Run the package test and typecheck commands. Refresh
pnpm-lock.yamlwhen package metadata changes.