Community编程与开发github.com

callstack/react-native-testing

使用 React Native Testing Library (RNTL) v13 和 v14 编写测试。适用于编写、审查或修复 React Native 组件测试。

react-native-testing 是什么?

该技能专门用于帮助开发者使用 React Native Testing Library (RNTL) 编写、审查和修复 React Native 组件的测试。它涵盖了 RNTL 的核心功能,包括 render、screen、各种查询方法(getBy/getAllBy/queryBy/findBy)、Jest 匹配器、userEvent、fireEvent、waitFor 以及异步模式。技能支持 v13(基于 React 18,同步渲染)和 v14(基于 React 19+,异步渲染)两个版本,确保兼容性。当处理 React Native 组件的测试文件、引用 RNTL 导入、或提及“testing library”、“write tests”、“component tests”、“RNTL”等关键词时,该技能会被自动触发,从而提供上下文相关的帮助和建议。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/callstack/react-native-testing-library/tree/main/skills/react-native-testing

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

react-native-testing 是做什么的?

使用 React Native Testing Library (RNTL) v13 和 v14 (@testing-library/react-native) 编写测试。适用于编写、审查或修复 React Native 组件测试。涵盖:render、screen、查询方法(getBy/getAllBy/queryBy/findBy)、Jest 匹配器、userEvent、fireEvent、waitFor 以及异步模式。支持 v13(React 18,同步渲染)和 v14(React 19+,异步渲染)。触发条件:React Native 组件的测试文件、RNTL 导入、提及“testing library”、“write tests”、“component tests”或“RNTL”。

相关技能