home / skills / partme-ai / full-stack-skills / detox
This skill guides you through Detox mobile testing for React Native, enabling efficient E2E tests, synchronization, and setup.
npx playbooks add skill partme-ai/full-stack-skills --skill detoxReview the files below or copy the command above to add this skill to your agents.
---
name: detox
description: Provides comprehensive guidance for Detox mobile testing framework including React Native testing, E2E testing, and test synchronization. Use when the user asks about Detox, needs to test React Native applications, write E2E tests for mobile apps, or configure Detox.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides practical, hands-on guidance for using the Detox end-to-end testing framework for mobile apps, with a focus on React Native. It covers setup, test writing, synchronization strategies, CI integration, and common troubleshooting tips to get reliable E2E tests running quickly. The goal is to help teams build stable, maintainable mobile E2E suites that accurately verify app behavior on real devices and simulators.
The skill explains how Detox drives your app by launching it on simulators or real devices, interacting with UI elements, and asserting outcomes while leveraging built-in synchronization to wait for the app to be idle. It walks through installing Detox, configuring test runners (Jest/Mocha), defining device and build configurations, writing element queries and actions, and interpreting logs. It also covers strategies to resolve flakiness, integrate with CI pipelines, and test platform-specific behaviors.
Does Detox work with React Native and native apps?
Yes. Detox supports React Native apps and native iOS/Android apps by interacting with UI elements exposed to the testing runtime.
How do I reduce flakiness in Detox tests?
Prefer synchronization and waitFor constructs, mock external services, stabilize testIDs, and avoid random data or timing-based assertions.
Can I run Detox in CI on both iOS and Android?
Yes. CI integration requires configuring device/emulator setup, appropriate build artifacts, and often headless or emulated device environments.