New issue

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

Documenting how to use enzyme with react 16. Fixes #131. #143

Merged
merged 2 commits into from Jul 11, 2018

Conversation

Projects
None yet
4 participants
@catchin
Contributor

catchin commented May 7, 2018

As there has been some confusion how to include enzyme in #131 , I updated the README at this place. Let me know if something needs to be changed.

@ShawnXiao105

This comment has been minimized.

ShawnXiao105 commented May 31, 2018

@catchin I follow your pr to add react-test-renderer and enzyme-adapter-react-16 without use eject. npm test still fail.

The error message is the same as

These options in your package.json Jest configuration are not currently supported by Create React App:

  • setupTestFrameworkScriptFile
@catchin

This comment has been minimized.

Contributor

catchin commented May 31, 2018

@ShawnXiao105 Can you share what steps you performed? I just created an app from scratch and it works. In this repo you see what steps I performed (as single commits) and what the code looks like: https://github.com/catchin/react-typescript-example-with-enzyme

Did you modify package.json to include a setupTestFrameworkScriptFile configuration? Because this is not necessary. Also, which version of react-scripts-ts do you use?

@ShawnXiao105

This comment has been minimized.

ShawnXiao105 commented Jun 4, 2018

@catchin It works now. The reason is that I add JEST options in package.json. And I Remove jest > setupTestFrameworkScriptFile key in package.json and all thing is OK.

And I also reference this thread

@DanielRosenwasser

This comment has been minimized.

Member

DanielRosenwasser commented Jul 11, 2018

Thank you so much for the PR and thanks for your patience!

@DanielRosenwasser DanielRosenwasser merged commit b016ad1 into Microsoft:master Jul 11, 2018

1 check passed

license/cla All CLA requirements met.
@catchin

This comment has been minimized.

Contributor

catchin commented Jul 12, 2018

Thanks for merging!

@catchin catchin deleted the catchin:readme-enzyme branch Jul 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment