-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add Jest for testing (if there is test folder) #93
Comments
I started to tackle this then realized I jumped the gun by adding Jest AND Enzyme. Before I go further in this direction, is using just Jest preferred? Adding Enzyme has a few more twists and is explained in the started documentation Testing.md that you can read in my commit. |
I think yes, I prefer using Jest with storyshots and don't use Enzyme |
I think also Jest is enough for most of the scenarios. But if someone says the reason why it's should be, We can discuss. I'm not 100% sure. |
We'll just go Jest then! Since getting Enzyme to work wasn't so straight forward, I'll add simple instructions for adding it in the docs. |
perfect! @bearcanrun |
So... I've run into a problem. Running Jest in the jsdom test environment throws breaking errors as reported in jsdom #1783. Though it says for ubuntu, I'm on a mac pro and get the same thing. When I change the First, is anyone willing to check to make sure it's not just me?
If you get error
and again run Then, any thoughts on course of action? It's weird that I had no problems with Enzyme installed, but it allowed me to easily shallow render the components. With just Jest, you have to mock everything out, at least, for snapshotting pages. |
Hey @bearcanrun, sorry I was not able to check comments on RAN last couple days. Should I test it or did u fix it? |
@bearcanrun Any progress on the jest test integration? |
Add Jest for testing (if there is test folder)
https://facebook.github.io/jest/
Task Rules
test
folder on the root, Jest will run.jest.config.js
on root.The text was updated successfully, but these errors were encountered: