/react-native-development-assistant:react-native-testingfrom react-native-development-assistant
Teaches React Native testing with Jest, Testing Library, Detox E2E, and CI/CD integration. Covers mocking native modules and APIs.
Ships in react-native-development-assistant. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Learn comprehensive testing strategies including unit tests, component tests, and E2E tests.
After completing this skill, you will be able to:
// jest.config.js
module.exports = {
preset: 'react-native',
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@react-native)/)',
],
};
import { render, screen, fireEvent } from '@testing-library/react-native';
import { Button } from './Button';
describe('Button', () => {
it('calls onPress when pressed', () => {
const onPress = jest.fn();
render(<Button title="Click" onPress={onPress} />);
fireEvent.press(screen.getByText('Click'));
expect(onPress).toHaveBeenCalled();
});
});
import { renderHook, act } from '@testing-library/react-native';
import { useCounter } from './useCounter';
describe('useCounter', () => {
it('increments count', () => {
const { result } = renderHook(() => useCounter());
act(() => result.current.increment());
expect(result.current.count).toBe(1);
});
});
// Mock native module
jest.mock('@react-native-async-storage/async-storage', () => ({
setItem: jest.fn(),
getItem: jest.fn(),
}));
// Mock API
jest.mock('./api', () => ({
fetchUser: jest.fn().mockResolvedValue({ id: '1', name: 'Test' }),
}));
describe('Login', () => {
beforeAll(async () => {
await device.launchApp();
});
it('should login successfully', async () => {
await element(by.id('email')).typeText('[email protected]');
await element(by.id('password')).typeText('password');
await element(by.id('login-btn')).tap();
await expect(element(by.id('home'))).toBeVisible();
});
});
// ProductCard.test.tsx
import { render, screen, fireEvent } from '@testing-library/react-native';
import { ProductCard } from './ProductCard';
const mockProduct = {
id: '1',
title: 'Test Product',
price: 99.99,
};
describe('ProductCard', () => {
it('renders product info', () => {
render(<ProductCard {...mockProduct} onPress={jest.fn()} />);
expect(screen.getByText('Test Product')).toBeOnTheScreen();
expect(screen.getByText('$99.99')).toBeOnTheScreen();
});
it('handles press', () => {
const onPress = jest.fn();
render(<ProductCard {...mockProduct} onPress={onPress} />);
fireEvent.press(screen.getByRole('button'));
expect(onPress).toHaveBeenCalledWith('1');
});
});
| Error | Cause | Solution |
|---|---|---|
| "Cannot find module" | Missing mock | Add jest.mock() |
| Async timeout | Missing await | Use waitFor() |
| Element not found | Wrong query | Check testID/role |
Skill("react-native-testing")
Bonded Agent: 06-react-native-testing
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
react-native-testing, jest, testing-library, detox, e2e-testing, ci-cd
7 skills in this plugin
/react-native-animationsMaster animations - Reanimated 3, Gesture Handler, layout animations, and performance optimization/react-native-basicsMaster React Native fundamentals - components, styling, layout, and Expo/react-native-deploymentMaster deployment - EAS Build, Fastlane, App Store, Play Store, and OTA updates/react-native-native-modulesMaster native modules - Turbo Modules, JSI, Fabric, and platform bridging/react-native-navigationMaster React Navigation - stacks, tabs, drawers, deep linking, and TypeScript integration/react-native-stateMaster state management - Redux Toolkit, Zustand, TanStack Query, and data persistenceClaude Code refuses to install this plugin
.claude-plugin/plugin.json: author: Invalid input: expected object, received string, commands: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job