Need advice about which tool to choose?Ask the StackShare community!
Enzyme vs Jasmine: What are the differences?
What is Enzyme? JavaScript Testing utilities for React, by Airbnb. Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output.
What is Jasmine? DOM-less simple JavaScript testing framework. Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.
Enzyme and Jasmine can be primarily classified as "Javascript Testing Framework" tools.
Enzyme and Jasmine are both open source tools. It seems that Enzyme with 17.4K GitHub stars and 1.91K forks on GitHub has more adoption than Jasmine with 14.4K GitHub stars and 2.12K GitHub forks.
According to the StackShare community, Jasmine has a broader approval, being mentioned in 143 company stacks & 75 developers stacks; compared to Enzyme, which is listed in 51 company stacks and 32 developer stacks.
Postman will be used to do integration testing with the backend API we create. It offers a clean interface to create many requests, and you can even organize these requests into collections. It helps to test the backend API first to make sure it's working before using it in the front-end. Jest can also be used for testing and is already embedded into React. Not only does it offer unit testing support in javascript, it can also do snapshot testing for the front-end to make sure components are rendering correctly. Enzyme is complementary to Jest and offers more functions such as shallow rendering. UnitTest will be used for Python testing as it is simple, has a lot of functionality and already built in with python. Sentry will be used for keeping track of errors as it is also easily integratable with Heroku because they offer it as an add-on. LogDNA will be used for tracking logs which are not errors and is also a Heroku add-on. Its good to have a separate service to record logs, monitor, track and even fix errors in real-time so our application can run more smoothly.
We use Mocha for our FDA verification testing. It's integrated into Meteor, our upstream web application framework. We like how battle tested it is, its' syntax, its' options of reporters, and countless other features. Most everybody can agree on mocha, and that gets us half-way through our FDA verification and validation (V&V) testing strategy.
Pros of Enzyme
Pros of Jasmine
- Can also be used for tdd64
- Open source49
- Originally from RSpec18
- Great community15
- No dependencies, not even DOM14
- Easy to setup10
- Simple8
- Created by Pivotal-Labs3
- Works with KarmaJs2
- Jasmine is faster than selenium in angular application1
- SpyOn to fake calls1
- Async and promises are easy calls with "done"1
Sign up to add or upvote prosMake informed product decisions
Cons of Enzyme
Cons of Jasmine
- Unfriendly error logs2