News for hackers. Stuff that matters.
Re:Jest – Painless JavaScript Testing by chenglou on Wednesday May 14, 2014 @01:38PM (#7744975)
Shorter feedback loop is always great. Running tests in parallel is a non-brainer.

Leveraging Jasmine is great too. Glad to see it's not reinventing the wheel!

Here's another interesting part, on dependency injection: http://facebook.github.io/jest/docs/common-js-testing.html#c...

Re:Jest – Painless JavaScript Testing by nawitus on Wednesday May 14, 2014 @05:55PM (#7746665)
I would've built Jest on top of Mocha. It's a slightly better testing framework, especially when it comes to async tests.
Re:Jest – Painless JavaScript Testing by jeffmo on Wednesday May 14, 2014 @06:57PM (#7746984)
At some point I'd like to add support for using mocha within Jest as well.

Right now we use jasmine internally, so I was pretty focused on getting it running with that. However, it is (quite intentionally) built such that the 'jasmine' parts are pretty isolated similar to a plug-in; So it should be possible to build plug-ins for other frameworks like Mocha as well at some point.

Re:Jest – Painless JavaScript Testing by vjeux on Wednesday May 14, 2014 @06:51PM (#7746947)
Mock functions are a really powerful tool. They let you test asynchronous functions in an entirely synchronous way. Because of that, Jest doesn't need to provide special support for asynchronous testing

http://facebook.github.io/jest/docs/tutorial.html#content

Re:Jest – Painless JavaScript Testing by couchand on Wednesday May 14, 2014 @07:22PM (#7747093)
That might work for simple cases but I'd be worried that switching all your asynchronous calls to synchronous has the potential to introduce bugs that your tests would then miss. Testing asynchronous functions is hard for lots of reasons, and only one of them is that you have to wait for it to finish.
Re:Jest – Painless JavaScript Testing by joshuacc on Wednesday May 14, 2014 @06:49PM (#7746934)
In what way? Jasmine 2.0 introduced Mocha-style done() for async tests.
Re:Jest – Painless JavaScript Testing by nawitus on Thursday May 15, 2014 @10:47AM (#7749705)
Oh, that's great :). That happened after I evaluated Jasmine the last time.
Re:Jest – Painless JavaScript Testing by caiob on Wednesday May 14, 2014 @01:43PM (#7745011)
It's great that they're improving an existing/familiar tool like Jasmine. Also, I love the way they treat CommonJS modules.