A dive in to how we use Jest to unit test our JavaScript at Facebook, why unit testing should be as easy and painless as possible, and how to make it that easy.
Original source
A dive in to how we use Jest to unit test our JavaScript at Facebook, why unit testing should be as easy and painless as possible, and how to make it that easy.
Original source
3 responses to “Jeff Morrison: JavaScript Unit Testing with Jest [JSConf2014]”
> never called it's callback
This is just writing fragile mock tests with less explicit mock setup code.
If you mock by default you wouldn't find the showcased bug, so how is it better?
'runAllTimers()' looks like it would use sinon.useFakeTimers() under the covers. Nothing new.
Auto mocking dependencies by default — that's awesome!! Thanks.