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

Testing Async Code with async/await

Code Quiz
7

Faking Timers with jest.useFakeTimers

Code Quiz
8

Rendering with RNTL render

Code Quiz
9

Querying by Text with getByText

Code Quiz
10

Spying with jest.spyOn

Code Quiz
11

Accessibility Queries getByRole

Code Quiz
12

Querying by testID with getByTestId

Code Quiz
13

getBy vs queryBy vs findBy

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

Wrong Setup Hook for Reset

Code Quiz
26

Over-Mocking the react-native Module

Code Quiz
27

jest.mock Factory Returns Nothing

Code Quiz
28

Matcher Not Actually Invoked

Code Quiz
29

jest.fn Missing Parentheses

Code Quiz
30

Broken describe Block Syntax

Code Quiz
31

Jest Preset for React Native

Code Quiz
32

Comparing Objects with toBe

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 Visibility Expectation

Code Quiz
45

Mocking Navigation Prop

Code Quiz
46

Mocking Fetch in a Test

Code Quiz
47

Detox Test Structure Basics

Code Quiz
48

Detox Tap and Type Actions

Code Quiz
49

Cleaning Up Between Tests

Code Quiz
50

Detox for End-to-End Testing

Slides / Video
51

Testing a Custom Hook

Code Quiz
52

Wrapping State Updates in act

Code Quiz
53

Firing a Press Event

Code Quiz
54

Snapshot Testing a Component

Code Quiz
55

Verifying a Callback Prop

Code Quiz
56

Waiting for Async UI

Code Quiz
57

Simulating Text Input

Code Quiz
58

Testing Components with Providers

Slides / Video
59

Simulating Events with fireEvent

Quiz
60

Coverage Thresholds

Quiz
61

Detox Synchronization

Quiz
62

Testing Custom Hooks

Quiz
63

Testing Props and Conditional Rendering

Quiz
64

Maestro E2E Flows

Quiz
65

Snapshot Testing Trade-offs

Quiz
66

Async Queries and waitFor

Quiz
67

Testing with Context Providers

Quiz
68

Detox Matchers and Actions

Quiz
69

Rendering with render()

Quiz
70

jest.fn vs jest.spyOn

Quiz
71

Mocking fetch Requests

Quiz
72

Common Jest Matchers

Quiz
73

Testing State Changes

Quiz
74

Test Structure Basics

Quiz
75

Setup and Teardown Hooks

Quiz
76

Testing with Navigation

Quiz
77

Mocking Native Modules

Quiz
78

Querying by testID and Text

Quiz
79

Faking Timers

Quiz
80

Unit Testing Pure Functions

Quiz
81

Handling act() Warnings

Quiz
82

Running Tests in CI

Quiz
83

Detox E2E Fundamentals

Quiz
84

Testing Pyramid Strategy

Quiz
85

Jest Config for React Native

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

Simulators/Emulators vs Real Devices

Flashcard
91

Detox for End-to-End Testing

Flashcard
92

Mocking with jest.mock and jest.fn

Flashcard
93

Testing Async UI with waitFor

Flashcard
94

Test Coverage Reporting

Flashcard
95

Updating Stale Snapshots

Flashcard
96

Simulating Events with fireEvent

Flashcard
97

Testing Hooks with renderHook

Flashcard
98

Maestro for E2E Flow Testing

Flashcard
99

Querying Elements in RNTL

Flashcard
100

Setup and Teardown Hooks

Flashcard
101

Using testID for Selection

Flashcard
102

Snapshot Testing Components

Flashcard
103

Providing Context and Store Wrappers

Flashcard
104

Writing E2E Test Flows

Flashcard
105

Jest Matchers and expect

Flashcard
106

The Testing Pyramid

Flashcard
107

Mocking Navigation in Tests

Flashcard
108

Appium as an E2E Alternative

Flashcard
109

React Native Testing Library Philosophy

Flashcard
110

Wrapping Updates in act()

Flashcard
111

Rendering Components with render()

Flashcard
112

Mocking Native Modules and AsyncStorage

Flashcard
113

Mocking Timers with useFakeTimers

Flashcard
114

Configuring the react-native Preset

Flashcard
115

Mocking Network Calls

Flashcard
116

Running Tests in CI/CD

Flashcard
117

Structuring Tests with describe and it

Flashcard
118

Debugging Failing Tests

Flashcard
119

Jest as the Default Test Runner

Flashcard
120

Unit Testing Pure Functions

Flashcard
121

Spying with jest.spyOn

Flashcard
122

Testing Async UI with waitFor & findBy

Slides / Video
FlashcardIntermediate

Configuring the react-native Preset

The react-native Jest preset applies the transforms and mocks needed for RN code.

Question

Why set "preset": "react-native" in your Jest config?

Click to reveal answer