Skip to content

Introduction to react testing library and writing some basic tests

Notifications You must be signed in to change notification settings

CodeCoachJS/js_pro_react_testing_intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started With React Testing Library


Set Up

npm i (install all dependencies)
npm start (to start the app)
npm test (to run tests, duh)

React Testing Docs

https://testing-library.com/docs/react-testing-library/intro/


Intro to Writing Tests - The React Way!

https://www.loom.com/share/e68d174317624ef5ab5b001ff9221ff9


Writing Tests with getById and getByText

https://www.loom.com/share/e9153ee088474d8294ce716d16f5b640


Writing Tests with Truth Tables

https://www.loom.com/share/19c8fcd5bba34450b5be135646aba66c

https://levelup.gitconnected.com/using-truth-tables-to-write-better-unit-tests-dd187f4a08e6


Your Turn

Watch the videos above and complete the TODOs in src/components/WelcomeBanner.spec.js - try and NOT copy what was done in the videos. These tests should be your own and feel free to change any code or make any additions you feel necessary!

About

Introduction to react testing library and writing some basic tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published