PLEASE READ: The Author's thoughts on Enzyme and React 18
IMPORTANT NOTE: enzyme-adapter-react-17 not yet available
OPTIONAL: Setting up Jest without create-react-app
More about Jest Watch Mode Test Files and Tests
Enzyme vs. React Testing Library
Enzyme Introduction and Setup
Why There is no Snapshot Testing in this Course
Course Repository on GitHub
Demo and Start Click Counter App
Set up Enzyme and Write Tests
First data-test Attribute Test
OPTIONAL: Ways to remove data-test attribute other than "eject"
OPTIONAL: Removing data-test Attributes for Production
More data-test Attribute Tests
Strategies and Design Decisions
Test Initial Counter Display
Acceptance Testing and Review
Click Counter Challenge Descriptions
Set up Jotto App and Congrats Component
Congrats Component Test Setup
Congrats Tests and the .text() Method
Code the Congrats Component
Notes about PropTypes Testing
OPTIONAL PropTypes Testing
OPTIONAL Code PropTypes and Update Tests
OPTIONAL Default Props in setup()
Move Enzyme Configuration to setupTests.js
Set up GuessedWords Component and Tests
GuessedWords PropTypes and setup()
Use `describe` for Context
Write Tests and beforeEach for "no words guessed"
Code for "no words guessed"
Tests for "nonzero guessed words"
Code for "nonzero guessed words"
Manual Acceptance Testing
Code Quiz! Basic Input Component
OPTIONAL: Introduction to React Hooks
Prepare Input Component for useState Tests
State-Controlled Field Tests and Code
Common Questions about Mocking React Methods
Clearing State-Controlled Field on Submit
Testing Input Render for `success` as `true` or `false`
`getLetterMatchCount` Helper Function
Introduction to Functional Tests and update App Component
First Functional Test: Submit Guess with No Previous Guesses
Code Quiz! Functional Tests for "Some Words Guessed" and "Correct Guess"
Jest methods: .only() .skip() and .todo()
Mocking Modules with Jest
Using useEffect to Get Secret Word on App Mount
Mocking the actions Module
Testing that useEffect is Called on App Mount Not Called on App Update
Write useEffect Code to Pass Tests
Choice point: Redux or React Context?
`CORRECT_GUESS` Action Creator
OPTIONAL: Introduction to the `useSelector` Hook
Testing Redux State for Input Component
Choices for Testing `useSelector`
`storeFactory` Test Helper
Updating Setup Function to use Store Factory
Summary: Intro to Redux Testing
Update moxios Tests for Redux
Write Action Creator and Reducer
Update App to use secretWord state: mock response and Jest settings
Manual Acceptance Testing
Jotto Challenges for Redux
Introduction to React Context
Jotto Data Flow with Context
Jotto Context Plan of Attack
Update `getSecretWord` Tests for Context Implementation
Update `getSecretWord` Code for Context Implementation
Intro to `useReducer` Hook
Refactor App State with `useReducer` Hook
Loading Spinner Planning and `describe.each()`
Test and Code Loading Spinner
Context Implementations in this Course
Language Context Planning
LanguagePicker Component: Planning and Setup
LanguagePicker Tests: Render and PropTypes
LanguagePicker Icon Click
Congrats Language Context Test Setup
Congrats Language Context Tests
Congrats Language Context Code
Code Quiz! Input Language Context
Fix App Test Language Warnings
GuessedWords Language Context Tests: Mocking useContext
GuessedWords Language Context Code
Manual Acceptance Testing
Context with Embedded State
Code Quiz! guessedWords Context
Set up Congrats and App Components for Success Context Testing
Test and Code Congrats Success Context
Set up GuessedWords Component for Context Testing
Test and Code GuessedWords Context in GuessedWords Component
Review of Context with Embedded State
Update Functional Test Setup for Context Implementation
Test and Code Input Consuming Success Context
Test and Code Input Setting Success Context
Test and Code Input Setting GuessedWords Context
Fix GuessedWords Provider Error in Input.test.js
Manual Acceptance Testing
Jotto Challenges for Hooks and Context
About these legacy lectures
Review of Jotto Redux State Plan
`CORRECT_GUESS` action creator
Tradeoffs to Unit Testing Action Creators / Reducers
Set Up Connected Component Tests
Input Component Test Organization
Start setup Function for Input Component
`storeFactory` Test Helper
Summary of Connected Component Setup and Choices
Input Tests and Code for success=false
Quiz! Write Input Tests and Code for success=true
Redux Thunk: What and Why
Set up `guessWords` Tests
Write Reducer and Action Creator
Thunk Integration Testing Summary
Set up `secretWord` Action Creator and Tests
Testing Asynchronous Action Creators
Write `getSecretWord` tests
Write `secretWord` Action Creator and Reducer
Summary: Asynchronous Action Creators and `moxios`
Testing Props and Action Creator Calls
OPTIONAL: Configure Jest Setup for non-create-react-app
Approach to Testing Action Creator Calls
`getSecretWord` call on App Mount
Quiz! Tests for `guessWord` on Input Submit Click
Write test for `guessWord` Argument
Write `guessWord` Call with Argument
Clear Input Box on Submit
Jotto Challenge Descriptions