-
Notifications
You must be signed in to change notification settings - Fork 384
Need to add example of JS Testing #9
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
Comments
I'd like to chime in just to say that I've been using Jest for a while with my react/webpack application living inside a rails project, and it is really awful. The tests take a long time to run, the errors are not very useful, the test environment barely acts like a real browser, the amount of setup required to get the Jest environment set up is ridiculous, and, most importantly, the documentation on Jest is just not there when I want to look up things (like calling Jest from node). When I looked at react-router's tests a couple of months ago, they were doing a weird build and pulling in multiple dependencies in a lot of places, but it looks like it's actually gotten quite better in the last week. I definitely recommend copying their setup with webpack building assets and loading them into karma. I had a similar setup previously and it worked quite well, despite a little bit of a hiccup with configuring everything. I really regret investing in Jest, since it has only proven to be painful over time. Let me know if you'd like to work together on this, since I need something like this for my own uses too. |
@kimagure thank you for such information. |
@justin808 I recommend konacha as well. It integrates nicely with sprockets and is easy enough to configure and get up and running with minimal fuss. The in-browser environment is more than suitable for interactive TDD, and the command-line runner works just right. Right now I'm trying to figure out how to integrate konacha with webpack, via webpack_assets. It's proving tricky... if you or anyone else has any insights, I'd definitely appreciate it. 👍 |
Jasmine looks good, it's BDD test framework which borrowed many RSpec features and syntax. Jest looks also good for unit testing ReactJS project. It's provided and used by Facebook. Plus six months passed, maybe Jest became better than @justinwoo described. |
@justin808 and now, is some news in here? |
Here's a few links from @alexfedoseev: https://reactjsnews.com/testing-in-react/ |
Let's get some simple JS tests that show how this can minimize the need for capybara tests of the ReactJS components.
The text was updated successfully, but these errors were encountered: