Some of you have reported test fail issues which give a message like
mockConstructor(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
The reason why you face this issue is, react-scripts version is 4.0.3 and it executes your test with the attribute, resetMocks as true by default. Therefore, your mock has been reset before executing your test spec, which causes mockConstructor error.
To fix this issue, please add this code in your package.json.
Some of you have reported test fail issues which give a message like
The reason why you face this issue is,
react-scripts
version is 4.0.3 and it executes your test with the attribute,resetMocks
as true by default. Therefore, your mock has been reset before executing your test spec, which causes mockConstructor error.To fix this issue, please add this code in your
package.json
.