testing-library

Enforce Jest and @testing-library/react-native best practices for Expo unit tests.

3|3|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/CodySwannGT/lisa --skill testing-library-codyswanngt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-library
Source: https://github.com/CodySwannGT/lisa/tree/main/plugins/lisa-expo/skills/testing-library
Command: npx skills add https://github.com/CodySwannGT/lisa --skill testing-library-codyswanngt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces best practices for unit testing in Expo applications, ensuring tests are user-centric, accessible, and maintainable, reducing bugs and improving code quality.

Core Features & Use Cases

  • User-Centric Testing: Focuses on behavior, not implementation details.
  • Accessible Queries: Prioritizes queries that mirror assistive technology usage.
  • Async Handling: Provides patterns for managing asynchronous operations in tests.
  • Expo Router Support: Includes specific guidance for testing with Expo Router.
  • Use Case: When writing a new unit test for a component, use this skill to ensure you're following the recommended query priority and assertion patterns, making your tests more robust and easier to understand.

Quick Start

Use the testing-library skill to write a new unit test for the user authentication component.

Frequently Asked Questions about testing-library

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

FAQPage Schema
How do I write accessible unit tests for React Native components in Expo?

To write accessible unit tests for React Native components in Expo, use Jest with @testing-library/react-native and prioritize queries that mirror assistive technology usage. This approach enforces user-centric, behavior-focused testing.

What is the best way to handle asynchronous operations in Jest tests for Expo?

Handling asynchronous operations in Jest tests for Expo involves applying established async handling patterns to ensure test reliability. These patterns guide developers in waiting for expected UI states before making assertions.

Can I use this testing approach with Expo Router?

Yes, this testing approach works with Expo Router and includes specific guidance for integration. It provides patterns to test routing behavior and component rendering within your Expo Router setup.

Why should I prioritize accessible queries over implementation details in unit testing?

Prioritizing accessible queries over implementation details in unit testing ensures tests are user-centric and robust. This reduces bugs and improves maintainability by focusing on component behavior rather than internal code structure.

What are common mocking patterns for Expo projects using Jest?

Common mocking patterns for Expo projects using Jest involve establishing standard guidelines for mocking modules and dependencies. This maintains test reliability while ensuring your tests remain focused on component behavior.