I created a new React application by create-react-app and I wanted to write a unit test to a component named \"MessageBox\" that I created in the application. This is the un
The file 'setupTests' has to be imported to the test file:
import MessageBox from "../MessageBox"; import { shallow } from 'enzyme'; import React from 'react'; import "../setupTests" test('message box', ()=> { ... })