write-tests
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.
Runner Choice
More from remix-run/remix
write-readme
Write or rewrite package README files in the style used by the Remix repository. Use when drafting a new package README, revising an existing README, or reviewing README structure, examples, installation instructions, and section ordering for Remix packages.
28add-package
Create or align a package in the Remix monorepo to match existing package conventions. Use when adding a brand new package under packages/, or when fixing an existing package's structure, test setup, TypeScript/build config, code style, and README layout to match the rest of Remix 3.
9remix-ui
Build the UI of a Remix app. Use when creating pages, layouts, client entries, interactions, stateful UI, navigation, hydration, styling, animations, reusable mixins, or UI tests.
7remix-project-layout
Describe the ideal layout of a Remix application, including canonical directories, route ownership, naming conventions, and file locations on disk. When asked to bootstrap that layout in a new directory, run the bundled TypeScript script.
6make-change-file
Create or update Remix repo change files under `packages/*/.changes`. Use when a user asks for release notes, a change file, a missing changelog entry, a prerelease note, or an update to existing unpublished release notes.
5write-api-docs
Write or audit public API docs for Remix packages. Use when adding or tightening JSDoc on exported functions, classes, interfaces, type aliases, or option objects.
5