Put in order · JavaScript and React course · Module 13: Testing React

Stages of test environment setup

Arrange the stages of setting up a React testing environment in the correct order:

Items to put in order

  • Run tests with npm test command
  • Install the dependencies: jest, jest-environment-jsdom, @testing-library/react
  • Write the first test (render + expect)
  • Configure Jest (setupFilesAfterEnv, transform, testEnvironment)
  • Fix errors and add more tests

You can check the correct answer by solving this task in the CodeWorlds game.