Brings together Jest testing patterns with a strong focus on factory functions and TDD workflow. You get reusable getMock functions for props and data, custom render utilities that wrap providers, and clear examples for mocking modules and GraphQL hooks. The TDD emphasis is real: write the failing test first, make it pass, then refactor. Includes practical patterns for React Native Testing Library queries and user interactions. The anti-patterns section is worth reading, especially the bit about testing actual behavior instead of mock behavior. Best when you want consistent test data across your suite and need concrete examples of the red-green-refactor cycle in practice.

skills.sh installs
908
GitHub stars
43.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill testing-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Testing Patterns and Utilities

Testing Philosophy

Test-Driven Development (TDD):

  • Write failing test FIRST
  • Implement minimal code to pass
  • Refactor after green
  • Never write production code without a failing test

Behavior-Driven Testing:

  • Test behavior, not implementation
  • Focus on public APIs and business requirements
  • Avoid testing implementation details
  • Use descriptive test names that describe behavior

Factory Pattern:

  • Create getMockX(overrides?: Partial<X>) functions
  • Provide sensible defaults
  • Allow overriding specific properties
  • Keep tests DRY and maintainable

Test Utilities

Custom Render Function

Create a custom render that wraps components with required providers:

// src/utils/testUtils.tsx
import { render } from '@testing-library/react-native';
import { ThemeProvider } from './theme';

export const renderWithTheme = (ui: React.ReactElement) => {
  return render(
    <ThemeProvider>{ui}</ThemeProvider>
  );
};

Usage:

import { renderWithTheme } from 'utils/testUtils';
import { screen } from '@testing-library/react-native';

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Category
Testing & QA
First seen
Apr 16, 2026

More from sickn33/antigravity-awesome-skills

All 708
1new-silvermoon avatarandroid-testingnew-silvermoon/awesome-android-agent-skillsComprehensive testing strategy involving Unit, Integration, Hilt, and Screenshot tests.869skills.sh installs
2ruvnet avatarbrowser-testruvnet/rufloUI test recipe -- composes browser-record (capture) + browser-replay (verify) so every test produces a replayable RVF artifact, not an ephemeral run756skills.sh installs
3charon-fan avatartest-automatorcharon-fan/agent-playbooktest automator736skills.sh installs
4aj-geddes avatarvisual-regression-testingaj-geddes/useful-ai-promptsDetect unintended visual changes in UI by comparing screenshots across versions. Use for visual regression, screenshot diff, Percy, Chromatic, UI testing, and v731skills.sh installs
5sickn33 avatarwebapp-testingsickn33/antigravity-awesome-skillswebapp testing700skills.sh installs
6charon-fan avatarqa-expertcharon-fan/agent-playbookqa expert678skills.sh installs