We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create-react-app my-app
jest.mock()
src/mock.js
jest.mock('react-dom', () => {})
src/App.test.js
import './mock.js' import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ...
--coverage
npm run test -- --coverage
I get this error:
I can't find a workaround for this, there's no documentation on how to import mocks so I can reuse them.
@cpojer It may be a Jest issue ? Am I doing something wrong ?
The text was updated successfully, but these errors were encountered:
Not sure if bug or not but we tagging this as something to fix.
Sorry, something went wrong.
this is definitely a Jest bug. We'll fix it.
Any idea on how to workaround this until it's fixed ? I can't figure out how to reuse my mocks in create-react-app right now
create-react-app
Moving the milestone because I want to release 0.4.2 today, and this is not fixed yet. @cpojer Could you provide any estimate on this?
We'll publish a fix with Jest 16 likely later this week.
Successfully merging a pull request may close this issue.
Steps:
create-react-app my-app
jest.mock()
, ex:src/mock.js
src/App.test.js
--coverage
:I get this error:

I can't find a workaround for this, there's no documentation on how to import mocks so I can reuse them.
@cpojer It may be a Jest issue ? Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: