write-tests

Write, refactor, or review tests with minimal fixtures in Remix packages.

33.3k|2.8k|Updated Oct 26, 2020
One-click install
npx skills add https://github.com/remix-run/remix --skill write-tests-remix-run
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/remix-run/remix/tree/main/.agents/skills/write-tests
Command: npx skills add https://github.com/remix-run/remix --skill write-tests-remix-run

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing tests for Remix packages can be time-consuming and error-prone, especially when coordinating fixtures, runners, and dependencies across workspace packages.

Core Features & Use Cases

  • Guided test structuring: encourages small, focused fixtures and clear describe/it blocks.
  • Dependency-conscious setup: ensures tests avoid circular dependencies and properly isolate packages.
  • Workflow alignment: aligns with the repo's testing infrastructure, fixture patterns, and validation steps.

Quick Start

Create a minimal test file validating a small surface area of a package using describe/it and Remix testing utilities.

Frequently Asked Questions about write-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write focused tests for Remix packages without circular dependencies?

To write focused Remix tests, use minimal fixtures and clear describe/it blocks. This approach ensures tests avoid circular dependencies and properly isolate packages across the workspace by applying the repo's runner and fixture patterns.

What is the best way to structure test fixtures for Remix workspace packages?

The best way to structure Remix test fixtures is to keep them small and focused on a minimal surface area. Aligning with the repo's testing infrastructure and validation workflows ensures proper package isolation and reliable test execution.

Does this approach support e2e tests and mocking in Remix?

Yes, this testing approach supports e2e tests, mocks, and coverage tests for Remix packages. It applies the repo's assertion helpers and fixture patterns to validate behavior across isolated workspace changes and test-only dependencies.

How do I configure devDependencies for test-only packages in a Remix workspace?

Configuring devDependencies for Remix tests involves applying package metadata for test-only dependencies across the workspace. This ensures tests use correct validation workflows and isolate workspace changes without introducing circular dependencies.

Why do my Remix package tests fail when running across different workspace packages?

Remix package tests often fail due to improper dependency isolation or misaligned fixture patterns. Ensure tests use the repo's designated runner, apply minimal fixtures, and validate behavior with correct devDependencies to avoid workspace conflicts.

Can I review and refactor existing Remix tests to align with repo validation workflows?

Yes, you can refactor existing Remix tests to align with repo validation workflows. This involves restructuring describe/it blocks, applying minimal fixtures, and ensuring proper use of assertion helpers and test-only dependencies.