Echo JS 0.11.0

<~>

MaxArt 2502 days ago. link 3 points
What do you mean you couldn't figure out how to achieve code coverage with Mocha? You have to run Istanbul on top of it and you're done:
https://istanbul.js.org/docs/tutorials/mocha/

For me, the real new concept of Jest is snapshot testing. It's handy but also quite jarring as it transforms all the tests in a string comparison, so the test logic is moved into the serializers.

Also Jest's watcher is quite nice.
tracker1 2501 days ago. link 1 point
Well, I'm not sure how much better it's gotten, I've frankly switched to Jest mostly... but nyc + istanbul + babel + mocha + chai (not to mention eslint and prettier), it begins to get unweildy...  While I prefer chai for assertions, I like jest.  Though I tend to favor babel-plugin-rewire + sinon for mocking most things, Jest has been pretty nice... for what I've used it to compare, I went from nearly a minute to under 12 seconds on the one project I converted.

Of course your code structure, and what it's doing will obviously vary.
MaxArt 2501 days ago. link 1 point
It's an odd situation here.
While React - the library for which Jest was conceived - is basically just a virtual DOM library and so it's very basic, lately the community is shifting from the highly customizable and pluggable standard of tools (like Gulp, PostCSS or Mocha's ecosystem) to more battery-included solutions (like webpack and Jest) that relieve developers the burden of choosing, setting up and maintaining a boatload of plugins.
At least that's what I feel about the web dev community right now.
tracker1 2501 days ago. link 1 point
In the end, people will gather around in the box tooling, until something better enough to break out comes along.  In this case, Jest includes assertions, and the testing syntax isn't completely alien... it also offers integration of babel easily, and istanbul in the box.  Yeah, it's more configuration, but that isn't always a bad thing.

It's pretty cyclical... as things approach a good point of equilibrium.  As long as choice remains, and it's easy enough to change many things later...  I've seen things change out several times the past few years.  And some of the composite tooling seems to be using other tools under the covers, or you can use those alone.