Hacker News new | ask | show | jobs
by spraak 3487 days ago
Two questions:

1. What good books (or repos) that use JS can you recommend for writing good tests?

2. What advantages does Jest have over Jasmine?

1 comments

RE: 2. Jest bundles Jasmine. It's primarily a test runner (like karma[1]) more than a framework. Jest includes mocking capabilities at the function level (like sinon[2]) and module level (like rewire[3]). It supports parallel execution, custom source code transpiling, file extension mocks (for webpack requires) and file watching. It favors large ES6 projects -- takes a second to start up.

[1]: https://github.com/karma-runner/karma [2]: http://sinonjs.org/ [3]: https://github.com/jhnns/rewire