Skip to content
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

Closed
skv-headless opened this issue Mar 6, 2015 · 11 comments · Fixed by #1331
Closed

Add Test Suite #396

skv-headless opened this issue Mar 6, 2015 · 11 comments · Fixed by #1331
Labels

Comments

@skv-headless
Copy link

I think about http://facebook.github.io/jest/

@hai-cea hai-cea changed the title Write some tests Add Test Suite May 15, 2015
@troutowicz
Copy link
Contributor

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.

@mattapperson
Copy link

The react-bootstrap project uses karma and mocha and it seems to be working well for them

@jkruder
Copy link
Contributor

jkruder commented Jun 29, 2015

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.

@mkucharz
Copy link
Contributor

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.

@hai-cea
Copy link
Member

hai-cea commented Jul 8, 2015

@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.

@oliviertassinari
Copy link
Member

@hai-cea Sorry, I have never tested react component before.

@WRidder
Copy link
Contributor

WRidder commented Jul 8, 2015

I can vote for the solution put forward by @jkruder. Used a similar setup which worked good; especially compared to Jest.

@mattapperson
Copy link

I also vote for the sollution from @jkruder

@WRidder
Copy link
Contributor

WRidder commented Jul 9, 2015

http://www.toptal.com/react/how-react-components-make-ui-testing-easy

Uses karma + mocha and makes a case against Jest.

@listepo
Copy link

listepo commented Jul 31, 2015

+1 Free for Open Source: https://www.browserstack.com or https://saucelabs.com/

@jkruder
Copy link
Contributor

jkruder commented Aug 1, 2015

@listepo Already on it. I'm working on integration with saucelabs.

@jkruder jkruder self-assigned this Aug 1, 2015
@jkruder jkruder mentioned this issue Aug 4, 2015
@alitaheri alitaheri added the test label Dec 23, 2015
@alitaheri alitaheri modified the milestone: Automated Tests Dec 23, 2015
brianfeister pushed a commit to brianfeister/material-ui that referenced this issue May 1, 2017
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants