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
Add import React from 'react'; to the top of your file.
You are using JSX syntax , which transpiles into React.createComponent(...). In order for this to work React variable must be defined in the scope of the file.