mobile-app-testing by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill mobile-app-testing为移动应用程序实施全面的测试策略,包括单元测试、UI 测试、集成测试和性能测试。
最小工作示例:
// Unit test with Jest
import { calculate } from "../utils/math";
describe("Math utilities", () => {
test("should add two numbers", () => {
expect(calculate.add(2, 3)).toBe(5);
});
test("should handle negative numbers", () => {
expect(calculate.add(-2, 3)).toBe(1);
});
});
// Component unit test
import React from "react";
import { render, screen } from "@testing-library/react-native";
import { UserProfile } from "../components/UserProfile";
describe("UserProfile Component", () => {
test("renders user name correctly", () => {
const mockUser = { id: "1", name: "John Doe", email: "john@example.com" };
render(<UserProfile user={mockUser} />);
expect(screen.getByText("John Doe")).toBeTruthy();
});
// ... (see reference guides for full implementation)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录中的详细实现:
| 指南 | 内容 |
|---|---|
| 使用 Jest & Detox 进行 React Native 测试 | 使用 Jest & Detox 进行 React Native 测试 |
| 使用 XCTest 进行 iOS 测试 | 使用 XCTest 进行 iOS 测试 |
| 使用 Espresso 进行 Android 测试 | 使用 Espresso 进行 Android 测试 |
| 性能测试 | 性能测试 |
每周安装量
255
代码仓库
GitHub 星标数
116
首次出现
Jan 21, 2026
安全审计
安装于
opencode228
gemini-cli213
codex206
claude-code197
cursor192
github-copilot182
Implement comprehensive testing strategies for mobile applications including unit tests, UI tests, integration tests, and performance testing.
Minimal working example:
// Unit test with Jest
import { calculate } from "../utils/math";
describe("Math utilities", () => {
test("should add two numbers", () => {
expect(calculate.add(2, 3)).toBe(5);
});
test("should handle negative numbers", () => {
expect(calculate.add(-2, 3)).toBe(1);
});
});
// Component unit test
import React from "react";
import { render, screen } from "@testing-library/react-native";
import { UserProfile } from "../components/UserProfile";
describe("UserProfile Component", () => {
test("renders user name correctly", () => {
const mockUser = { id: "1", name: "John Doe", email: "john@example.com" };
render(<UserProfile user={mockUser} />);
expect(screen.getByText("John Doe")).toBeTruthy();
});
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| React Native Testing with Jest & Detox | React Native Testing with Jest & Detox |
| iOS Testing with XCTest | iOS Testing with XCTest |
| Android Testing with Espresso | Android Testing with Espresso |
| Performance Testing | Performance Testing |
Weekly Installs
255
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode228
gemini-cli213
codex206
claude-code197
cursor192
github-copilot182
xdrop 文件传输脚本:Bun 环境下安全上传下载工具,支持加密分享
20,700 周安装