-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 Test Suite #396
Comments
I had issues with jest when I was picking a test suite for a react project a couple months ago. I ended up using mochify which has worked well for my project. My issues with jest were really the limitations of jsdom, which may not be an issue for material-ui. |
The react-bootstrap project uses karma and mocha and it seems to be working well for them |
At work I set up mocha/sinon/chai/phantomjs and that's working really well for us. We have a single HTML file that we use as a template (has hooks for the mocha/sinon/global js/css files so that the path can be dynamically inserted) to generate an HTML file per test suite. This allowed us to nest our test structure as deep as we wanted without having to be concerned with keeping an HTML file's paths up to date and managing multiple HTML files. I would recommend phantomjs over jsdom because phantomjs is a headless browser and does not require node-gyp (maybe when node and io have finished their merge jsdom will not require node-gyp). @hai-cea If this is something you're interested in I can put a PR together. |
We are using jest, but it is extremely slow and memory consuming. We had to change number of concurrent workers because jest was consuming over 4GB of memory (which is a limit in Circle CI). Based on experience in some other projects (e.g. http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/) we'll probably test mocha in near future. |
@oliviertassinari Would you like to weigh in on which test suite to use? I think this is something we definitely need and is on roadmap. |
@hai-cea Sorry, I have never tested react component before. |
I can vote for the solution put forward by @jkruder. Used a similar setup which worked good; especially compared to Jest. |
I also vote for the sollution from @jkruder |
http://www.toptal.com/react/how-react-components-make-ui-testing-easy Uses karma + mocha and makes a case against Jest. |
+1 Free for Open Source: https://www.browserstack.com or https://saucelabs.com/ |
@listepo Already on it. I'm working on integration with saucelabs. |
* update deps * Using babel-env instead, still produce same result * Fix not found implementation for stable react-router v4.0.0 * Restore and update deps
I think about http://facebook.github.io/jest/
The text was updated successfully, but these errors were encountered: