Tests common

From trezor/trezor-suite · View interactive version

Tests common is an AI agent skill from the GitHub repository trezor/trezor-suite. TDD practices and test utilities for suite-common packages, including Red-Green-Refactor workflow and @suite-common/test-utils usage. Use when writing tests for suite-common packages.

How to use this skill

Skill file

Writing Common Tests (TDD)

This skill enforces Test-Driven Development (TDD) practices for suite-common packages and ensures proper usage of the

@suite-common/test-utils package.

Core Principles

1. Test-First Development

1. Red: Write a failing test that describes the desired behavior. Run test to confirm it fails for the right

reason (e.g., "Expected value to be X but got Y").

2. Green: Write the minimum code to make the test pass. Run test to confirm it passes.

3. Refactor: Clean up the code while keeping tests green. Run test to confirm it still passes after refactoring.

2. Writing tests

3. Use @suite-common/test-utils Package

Checklist

Before submitting code, ensure:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.