testing

Write and maintain Jest unit and integration tests for Ledger Wallet apps.

610|480|Updated Jan 4, 2022
One-click install
npx skills add https://github.com/LedgerHQ/ledger-live --skill testing-ledgerhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/LedgerHQ/ledger-live/tree/main/.cursor/skills/testing
Command: npx skills add https://github.com/LedgerHQ/ledger-live --skill testing-ledgerhq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing unit and integration tests for Ledger Wallet apps to ensure reliability and maintainability across desktop/mobile environments.

Core Features & Use Cases

  • Supports Jest-based testing for desktop/mobile components and hooks.
  • Includes MSW network mocks and testing best practices.
  • Provides templates and guidance for test structure, mocks, and test data.

Quick Start

From the project root, run the Jest test suite to execute unit and integration tests.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I write integration tests for Ledger Live apps using Jest and MSW?

To write integration tests for Ledger Live apps, you use Jest alongside MSW to mock network requests. This skill provides testing workflows that validate components and hooks across desktop and mobile codebases using MSW-based API mocks.

What is the best way to test React components in the Ledger Live codebase?

Testing React components in the Ledger Live codebase is best done using React Testing Library. This skill provides templates and guidance for structuring tests, creating mocks, and overriding store state for reliable component validation.

Can I use this testing workflow for both Ledger Live desktop and mobile apps?

Yes, this testing workflow supports both Ledger Live desktop and mobile apps. It is applicable to shared codebases, allowing you to write unit and integration tests for components, hooks, and utilities across both environments.

How do I override store state and mock data in Ledger Live tests?

You override store state and mock data in Ledger Live tests by utilizing provided test patterns and MSW network mocks. This skill offers specific guidance on configuring mocks and managing test data for consistent test execution.

Do I need React Testing Library to test Ledger Live hooks and utilities?

You need React Testing Library to test Ledger Live hooks and components effectively. This skill supports React Testing Library workflows to ensure maintainability and reliability when validating app logic and UI behavior.