Explore Library
React NativeTesting (Unit, Component & E2E)

122 items

1

Testing Navigation-Dependent Components

Slides / Video
2

Asserting Element Presence

Code Quiz
3

Detox waitFor Synchronization

Code Quiz
4

Rendering With a Context Provider

Code Quiz
5

Mocking Network Requests in Tests

Slides / Video
6

Querying by testID with getByTestId

Code Quiz
7

Spying with jest.spyOn

Code Quiz
8

Testing Async Code with async/await

Code Quiz
9

Faking Timers with jest.useFakeTimers

Code Quiz
10

Rendering with RNTL render

Code Quiz
11

Querying by Text with getByText

Code Quiz
12

getBy vs queryBy vs findBy

Code Quiz
13

Accessibility Queries getByRole

Code Quiz
14

Simulating User Events with fireEvent

Slides / Video
15

Using testID for Element Selection

Slides / Video
16

Querying Elements in Tests

Slides / Video
17

Rendering Components with render()

Slides / Video
18

React Native Testing Library Overview

Slides / Video
19

Mocking Native Modules & Timers

Slides / Video
20

Mocking Functions with jest.fn & Spies

Slides / Video
21

Mocking Modules with jest.mock

Slides / Video
22

Setup & Teardown: beforeEach, afterEach

Slides / Video
23

Common Jest Matchers

Slides / Video
24

Test Structure: describe, it, expect

Slides / Video
25

Matcher Not Actually Invoked

Code Quiz
26

Broken describe Block Syntax

Code Quiz
27

Comparing Objects with toBe

Code Quiz
28

jest.mock Factory Returns Nothing

Code Quiz
29

Jest Preset for React Native

Code Quiz
30

Wrong Setup Hook for Reset

Code Quiz
31

jest.fn Missing Parentheses

Code Quiz
32

Over-Mocking the react-native Module

Code Quiz
33

Unit Testing Functions & Utilities

Slides / Video
34

Simulators vs Real Devices

Flashcard
35

Configuring Jest for React Native

Slides / Video
36

Jest as the Default Test Runner

Slides / Video
37

Testing Pyramid: Unit, Component, E2E

Slides / Video
38

What & What Not to Test

Slides / Video
39

Running Tests in CI/CD Pipelines

Slides / Video
40

Test Coverage Reports & Thresholds

Slides / Video
41

Writing E2E Test Flows on Device

Slides / Video
42

Maestro as an E2E Testing Alternative

Slides / Video
43

Enabling Jest Coverage Reports

Code Quiz
44

Detox Test Structure Basics

Code Quiz
45

Mocking Navigation Prop

Code Quiz
46

Detox Visibility Expectation

Code Quiz
47

Detox Tap and Type Actions

Code Quiz
48

Mocking Fetch in a Test

Code Quiz
49

Cleaning Up Between Tests

Code Quiz
50

Detox for End-to-End Testing

Slides / Video
51

Firing a Press Event

Code Quiz
52

Waiting for Async UI

Code Quiz
53

Wrapping State Updates in act

Code Quiz
54

Simulating Text Input

Code Quiz
55

Snapshot Testing a Component

Code Quiz
56

Testing a Custom Hook

Code Quiz
57

Verifying a Callback Prop

Code Quiz
58

Testing Components with Providers

Slides / Video
59

Testing with Context Providers

Quiz
60

Snapshot Testing Trade-offs

Quiz
61

Testing Props and Conditional Rendering

Quiz
62

Detox Matchers and Actions

Quiz
63

Maestro E2E Flows

Quiz
64

Rendering with render()

Quiz
65

jest.fn vs jest.spyOn

Quiz
66

Mocking fetch Requests

Quiz
67

Testing State Changes

Quiz
68

Test Structure Basics

Quiz
69

Setup and Teardown Hooks

Quiz
70

Testing Custom Hooks

Quiz
71

Detox Synchronization

Quiz
72

Coverage Thresholds

Quiz
73

Simulating Events with fireEvent

Quiz
74

Testing with Navigation

Quiz
75

Mocking Native Modules

Quiz
76

Querying by testID and Text

Quiz
77

Faking Timers

Quiz
78

Unit Testing Pure Functions

Quiz
79

Handling act() Warnings

Quiz
80

Running Tests in CI

Quiz
81

Testing Pyramid Strategy

Quiz
82

Jest Config for React Native

Quiz
83

Async Queries and waitFor

Quiz
84

Common Jest Matchers

Quiz
85

Detox E2E Fundamentals

Quiz
86

Mocking Modules with jest.mock

Quiz
87

Snapshot Testing Components

Slides / Video
88

Testing Hooks with renderHook

Slides / Video
89

Asserting Component Output

Slides / Video
90

Setup and Teardown Hooks

Flashcard
91

Test Coverage Reporting

Flashcard
92

Unit Testing Pure Functions

Flashcard
93

Spying with jest.spyOn

Flashcard
94

The Testing Pyramid

Flashcard
95

Snapshot Testing Components

Flashcard
96

Writing E2E Test Flows

Flashcard
97

Updating Stale Snapshots

Flashcard
98

Providing Context and Store Wrappers

Flashcard
99

Simulating Events with fireEvent

Flashcard
100

Mocking with jest.mock and jest.fn

Flashcard
101

Detox for End-to-End Testing

Flashcard
102

React Native Testing Library Philosophy

Flashcard
103

Testing Hooks with renderHook

Flashcard
104

Jest Matchers and expect

Flashcard
105

Simulators/Emulators vs Real Devices

Flashcard
106

Testing Async UI with waitFor

Flashcard
107

Maestro for E2E Flow Testing

Flashcard
108

Appium as an E2E Alternative

Flashcard
109

Querying Elements in RNTL

Flashcard
110

Using testID for Selection

Flashcard
111

Mocking Native Modules and AsyncStorage

Flashcard
112

Mocking Timers with useFakeTimers

Flashcard
113

Configuring the react-native Preset

Flashcard
114

Mocking Network Calls

Flashcard
115

Running Tests in CI/CD

Flashcard
116

Wrapping Updates in act()

Flashcard
117

Mocking Navigation in Tests

Flashcard
118

Rendering Components with render()

Flashcard
119

Structuring Tests with describe and it

Flashcard
120

Debugging Failing Tests

Flashcard
121

Jest as the Default Test Runner

Flashcard
122

Testing Async UI with waitFor & findBy

Slides / Video
FlashcardIntermediate

Mocking Navigation in Tests

Provide a mocked or test navigation context so screens render in isolation.

Question

How do you handle navigation when testing a screen component?

Click to reveal answer