-
Notifications
You must be signed in to change notification settings - Fork 145
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
Discussion about Jest for unit tests #33
Comments
Cool, that's a good topic @tobika. IMHO Jest is awesome: Some other advantages of Jest:
I've been using karma long time but requires too much configuration and knowledge about the related tooling (karma conf, webpack, etc). Ability to test is a must have and I don't understand why Ionic does not add support for testing by default. I'm really thinking to move from Karma to Jest soon. I've got a simple example of testing Ionic2 with Jest. I hope everybody finds it useful. |
Do you guys know if there is a way to have karma and jest exist in the same project? I realize that might be an odd question, but I'm wondering if the best move would be to create a jest branch structured similarly but with only the items needed for jest. Thoughts? |
I don't know. As I know, Jest sits on top of Jasmine, most of the API is similar but there are slight differences that require migrating some of Jasmine calls. Also, we need to remove So tests are slightly different. Maybe it's best to create a different branch for now. |
I just added a PR #32 to have an example of working unit tests with Jest.
Maybe we could use this issue for discussion if other people are interested in making jest usable with ionic. Also maybe there are good reasons not to use Jest with ionic. I would appreciate if someone could enlighten me in this case :)
Some advantages of Jest over Karma:
Article about testing with Jest in angular:
https://www.xfive.co/blog/testing-angular-faster-jest/
The text was updated successfully, but these errors were encountered: