/js_pro_react_testing_intro

Introduction to react testing library and writing some basic tests

Primary LanguageJavaScript

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!