Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

writing-tests

БесплатноБез исполняемых скриптовНе проверен

Guidance for explicitly requested new tests and for updating or reviewing existing tests in the Remotion repository.

remotion-devот remotion-dev★ 77 030 звёзд на GitHub

Об этом скилле

Writing Tests

Apply this skill when the user explicitly requests new tests or when existing tests, fixtures, or snapshots need updates for feature work, bug fixes, refactors, or PR preparation. Do not add new tests, including new test cases in existing files, unless the user explicitly requests them. A request to review tests does not authorize changing them.

The purpose of a test is confidence that a workflow or contract works for a Studio user, CLI user, package consumer, or renderer consumer.

Test the feature at the widest stable boundary that gives useful confidence. Prefer one complete integration workflow; use focused unit tests for genuinely complex logic and E2E tests for critical cross-process workflows.

Test count, assertion count, file count, and coverage percentage are not quality metrics. One rendered frame, final artifact, or persisted-source assertion can give more confidence than many narrow unit assertions.

A test that stays green when the feature is disconnected is not useful primary coverage. For a user-facing or cross-layer feature, a private helper unit test must not be the only coverage.

Choose the boundary before writing the test

Answer these questions first:

  1. What failure would a user or public API consumer notice?
  2. What is the widest stable boundary that can reproduce it economically?
  3. Is there an existing integration or E2E workflow that can be extended?
  4. Would the proposed test fail if the feature entry point stopped calling the tested helper?
  5. Which edge cases, if any, still justify focused unit tests?

Test type is determined by the boundary, not the directory or runner. A Bun test can be an integration test, while a Playwright test can still be coupled to implementation details.

Use these primary boundaries:

Change Preferred primary coverage
Studio interaction Playwright action followed by a visible, source-file, persistence, URL, or rendered outcome
Studio Server or codemod Realistic source fixture through the route or handler, followed by the resulting source or event
Core, Player, or Media Mount or render the real component with real neighboring modules and representative media
Web renderer or visual effect Browser render, image comparison, pixel probe, or produced frame
CLI Execute the command and assert exit code, output, and filesystem effects
Renderer, SSR, templates, or packaging Public API through packages/it-tests or a realistic temporary project
Lambda or cloud orchestration Full orchestration with only the remote provider mocked or faked
Pure math, parser, serializer, protocol transformation, or state machine Focused, preferably table-driven unit tests

Do not force every change through Playwright. A route-level or filesystem integration is often the best stable boundary. Reserve full E2E tests for important risks that cross browser, server, filesystem, HMR, or process boundaries.

Assert contracts and outcomes

Prefer outcomes a user or integrator can observe:

  • Rendered frames, pixels, media timestamps, image output, and visual regressions
  • Generated or persisted source code and files
  • Public return values, events, errors, and protocol messages
  • CLI exit status, output, prompts, and filesystem changes
  • Studio text, accessible names, focus, enabled state, navigation, and persistence
  • Requests to external boundaries, including method, path, and payload when those are the contract

Prefer a positive final outcome proving the path ran. does not throw, not visible, not present, or “error absent” is weak as the only proof. First assert the expected reorder, file mutation, request, rendered output, persisted state, or successful result; add the negative assertion only when it provides additional confidence.

When generated code is the user-visible artifact, source assertions are legitimate. Assert the meaningful output and avoid coupling to irrelevant formatting unless formatting itself is part of the contract.

Studio and product UI tests

Locate controls as users find them: getByRole, getByLabel, getByText, and accessible names. Prefer semantic stat

Полный SKILL.md на GitHub

Установить writing-tests в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл writing-tests?

Guidance for explicitly requested new tests and for updating or reviewing existing tests in the Remotion repository.

Как установить скилл writing-tests?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл writing-tests запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить writing-tests с