Chapter 10
- The
describe
function blocks are used to group test cases that are related to each other. - Jest will execute the
beforeAll
function once before any of the tests in the surroundingdescribe
block are executed. - Yes, you can run asynchronous tests in Jest.
- You can use the
userEvent
function to emulate a user typing into a text field. - With the Create React App test script and Jest, calculating the code coverage is as easy as specifying the
--coverage
argument when executing thenpm
test
command.