Reputation: 1315
I watched a tutorial where the author's advice is to use the expect
framework to write better assertions:
https://github.com/mjackson/expect.
But as far as I can see, this is exactly the same as jasmine
, and jasmine is far better known. Did jasmine
absorb the expect
library?
Is there any practical difference between the two?
Upvotes: 2
Views: 295
Reputation: 25429
Jasmine is a complete testing framework. expect is just the assertions and would be used in conjunction with something like mocha.
On the Jasmine home page:
BATTERIES INCLUDED
Comes out of the box with everything you need to test your code.
Where as on expect:
You can think of expect as a more compact alternative to Chai or Sinon.JS
I read this article a few days ago in deciding what to use for a project. It was a good read and insightful. Check section 1 (API) for where expect (or similar? there are two expect libraries apparently) fits in to the picture.
http://thejsguy.com/2015/01/12/jasmine-vs-mocha-chai-and-sinon.html
Upvotes: 3