You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-4
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,39 @@
1
-
# Intro to React session 2 lecture
1
+
# Testing in React lecture
2
2
3
-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Its is a simple blog style posts page used to demonstrate the basics of useState, prop types, basic event handlers and a broad intro to working with React in general.
3
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). It is built on a demo repo used for the react intro 2 lecture, a simple blog style posts page built using useState, prop types and basic event handlers.
4
+
5
+
Here we will using Jest, React testing library and React test renderer to add tests that:
6
+
- create snapshots
7
+
- use valid props for test objects
8
+
- fetch elements using queries
9
+
- validate elements onn screen using matchers
10
+
- mock functions with Jest
11
+
- validate functions are being called when triggering an event listener
4
12
5
13
## Setup
6
14
*This repo is intended as a guide for a tutor when giving the lecture*
7
15
8
16
The `main` branch contains the basic application, this can be forked and used as the base for a fresh repo created over the course of a lecture for the students to use when following along with the video recording.
0 commit comments