Error: Uncaught [Error: mockConstructor(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.]
Downgraded react-scripts to 3.4.0, installed jest-environment-jsdom-sixteen, running react-scripts test --env=jsdom-sixteen, just can't get it to run.
Which if course, was resetting the implementation. I think the issue is react-scripts 4 added "resetMocks": true, as a default so it might be fixed by just:
"jest": {
"resetMocks": false,
}
in your package.json
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Cannot get this solution to work.
Downgraded
react-scriptsto 3.4.0, installedjest-environment-jsdom-sixteen, runningreact-scripts test --env=jsdom-sixteen, just can't get it to run.Finally! I had:
Which if course, was resetting the implementation. I think the issue is react-scripts 4 added
"resetMocks": true,as a default so it might be fixed by just:in your package.json