-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 a section on integrating Jest into popular frameworks #2714
Comments
Here's great @kentaromiura post about Vue.js integration. So good! https://medium.com/@kentaromiura_the_js_guy/jest-for-all-episode-1-vue-js-d616bccbe186#.d573vrce2 |
+1 for MobX |
@thymikee Can I find some reliable blog posts from people using Jest with these frameworks and add them here. Afterwards, I can also make a PR for these tutorial links |
@abdulhannanali you're more than welcome! |
@thymikee We can include Redux's Documentation part Writing Tests as it prefers Jest for JavaScript Testing. However, It uses enzyme for testing React Components. |
any lucky with an Ember example? I've tried, but the QUnit looks like a black-box-magic 😅 |
I've also tried it couple of months ago without luck, but will try to tackle it some time soon, although I'm not so optimistic. We'll see! |
Hailing @trentmwillis and @Turbo87, who might at least know who else might be interested in exploring this for Ember. |
@chriskrycho I am quite interested in this, but since jest only targets nodejs (and jsdom) it doesn't fit well for running frontend tests. In Ember it would need to replace testem+qunit but it seems like the tradeoffs are not worth it at this point. |
Actually, this is not true any longer. Jest's runner can now (as of |
that part sounds like it could easily be used in Ember tests, just like we integrate Chai (https://github.com/ember-cli/ember-cli-chai)
that sounds interesting. the runner is certainly nice to use, but on the other hand I don't see too many advantages of using it for Ember tests at this point. I'd be happy to chat about the details though if anyone is interested in learning about the testing story in Ember and teaching me about Jest and the possible integration points. |
@cpojer is it possible to use multiple runners? I would like to integrate ESLint into Jest so that it generates tests per linted file and using a custom runner for that might make this viable, but if only a single runner can be used I would still need to run multiple instances of Jest which defeats the purpose. |
@Turbo87 yes, it will be possible. Here is an experimental runner for eslint, by @rogeliog: https://github.com/jest-community/jest-runner-eslint |
@thymikee ember-cli-mocha is another popular testing setup in Ember. Not sure if that helps you |
@brandonjmckay thanks for your interest, but I don't have the bandwidth to tackle Ember integration. Hopefully someone from the community will make it one day :) |
Coming from Ember world and Mocha world. My team is looking to move our backend from mocha to jest. Where would I get started if I wanted to begin writing the ember jest integration? cc @brandonjmckay @thymikee |
Are you saying you have something working already? That would be lovely! I remember trying this some time ago and aligning Quint with Jest Jasmine style was a nightmare and I left it as it was not a priority. If you do have it, feel free to open a PR with the link to the article or repo :) |
I do not yet, but I'm interested in taking a stab in the near future! |
@thymikee @jasonworden the problem remains the same: Jest does not run in the browser. I would love to see Jest support this use case, but until that is the case using it to properly test Ember apps seems problematic. while it's true that Jest can drive other test runners it would AFAICT still be responsible for test file discovery and need deep build system integration. |
@Turbo87 Is there an existing issue dedicated to running in the browser? |
@jasonworden you may be interested in #139 and #848 |
@thymikee FYI Ember has worked towards being test-framework agnostic, and my team is already using it with Mocha, not QUnit! So an Ember-Jest marriage is forseeable 👓 |
@jasonworden @Turbo87 you might like jest-lite which lets you run Jest tests in the browser. 🙂 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
While speaking with some devs on a JS meetup I got this feeling, that many of them are struggling with testing JS with specific frameworks like Angular 1.x/2 Ember or Vue.
I think it would be a good idea to find some reliable blog posts on successful integrations with these frameworks and link it from our documentation.
Tutorials on Jest + framework / lib:
The text was updated successfully, but these errors were encountered: