News for hackers. Stuff that matters.
Re:Jest – Painless JavaScript Testing by vjeux on Wednesday May 14, 2014 @03:20PM (#7745706)
Jasmine provides you with the testing primitives such as describe(), it(), expect(value).toEqual(other): http://facebook.github.io/jest/docs/api.html#globally-inject...

Jest adds multiple layers on-top:

- A mock library (also called stubs) in order to create fake functions and assert that they are called as you want: http://facebook.github.io/jest/docs/mock-functions.html#cont...

- A way to provide an alternate implementation for dependencies using require(): http://facebook.github.io/jest/docs/common-js-testing.html#c...

- It inspects the shape of your dependencies and return a mocked version of them: http://facebook.github.io/jest/docs/automatic-mocking.html#c...

- Finally, it works in node instead of the browser and uses jsdom to let you test code related to the DOM. (It also runs tests in parallel)

Re:Jest – Painless JavaScript Testing by nlh on Wednesday May 14, 2014 @03:50PM (#7745912)
Many thanks! (to both of you ;)
Re:Jest – Painless JavaScript Testing by kumar303 on Thursday May 15, 2014 @12:31PM (#7750482)
Can someone copy/paste this into the docs? :) It was really helpful, thanks.
Re:Jest – Painless JavaScript Testing by jeffmo on Thursday May 15, 2014 @12:54PM (#7750666)
I went ahead and added it to the main page of the website:

http://facebook.github.io/jest/

Re:Jest – Painless JavaScript Testing by jeffmo on Wednesday May 14, 2014 @03:26PM (#7745744)
jinx!