Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wish all it was was a mocking library... w/o the testing built in.

That way you could use it easily with Mocha (and should, etc).



(Hi, I'm the fb eng who wrote Jest)

Yea, I'd really like to add support for other testing frameworks 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 as well (like Mocha, QUnit, etc) in the future.


You might want to look at http://www.venusjs.org/ to get some ideas for supporting multiple testing frameworks. It uses an annotation approach kind of how you include files for tests. The automatic mocking is pretty awesome though.


This looks really neat, having to re-specify the interface of the collaborators is generally a bunch of boilerplate you don't want to need!

Did you consider building on top of Sinon.JS and only having jest do the require/detect/build-mock part? Your mock API seems very similar.


I hadn't looked at Sinon.JS before, but it does seem worth checking into...thanks!


Any plans to support AMD or just commonjs?



this is awesome. thank you for your work.


I use sinon (function mocking) and proxyquire (mock requires) for mocking with mocha and they work well.


Have you looked at JsMockito?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: