An open API service indexing awesome lists of open source software.

https://github.com/yei-linux/gamerepeated


https://github.com/yei-linux/gamerepeated

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# SUMMARY ABOUT UNIT TEST WITH REACT TESTING LYBRARY

## 1. TESTING REACTDOM AND SMALL COMPONENTS

- Main concepts and setup jest with rtl
- Jest
- RTL
- JestConfig and eslint
- Running tests
- Setup Jest and extends
- Project Structure
- Describe , test(it) , done, after all , after each , before all , before each
- Render, screen , matchers
- FireEvent vs UserEvent
- Snapshots
- Good practices

## 2. TESTING CONTEXT CONNECTED COMPONENTS AND REDUX

- Act
- WaitFor
- Mocks context
- rerender
- Testing reducers with context
- Testing reducers with redux store

## 3. TESTING REACT HOOKS AND API CONNECTED COMPONENTS(FETCH AND AXIOS)

- renderHook
- jest.fn and returnValues on callbacks
- jest.spyOn
- jest.mock with modules
- mocks
- mock resolved value
- mock resolved value once

## 4. TESTING REACT ROUTER COMPONENTS

- test react router
- coverage
- sonarqube