Getting Started
In this lesson, we'll begin installing the testing libraries we are to use on the client application.
Continuing from where we left off in our TinyHouse application and taking a look at our client project's package.json
file, we'll notice type definitions already installed for the Jest library.
"@types/jest": "^24.0.0",
This installed type definition comes from the generated code that Create React App helped scaffold for us to instantiate a client-side React application.
The Jest library itself is also installed but part of the react-scripts
bundle installed and used to run scripts in our app.
"react-scripts": "3.4.1",
The Running Tests section of Create React App's documentation gives us information on the Jest set-up made with CRA. Of particular interest is the filename convention Jest in CRA will look for with regards to test files:
This page is a preview of TinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two