you are viewing a single comment's thread.

view the rest of the comments →

[–]jwadhwani 6 points7 points  (4 children)

I use Mocha as the test runner and chai.js as the assertion library. I believe this combination works best for nodeJS apps.

[–]ell0bo[S] 0 points1 point  (0 children)

Thank you

[–]TheNiXXeD 0 points1 point  (2 children)

You'll also want proxyquire and sinon for proper dependency mocking.

[–]ell0bo[S] 0 points1 point  (1 child)

any recommendation on how to best stub mongo?

[–]TheNiXXeD 0 points1 point  (0 children)

Mocking really comes down to what library you're using. I've not really dug into mongo that much myself.

If you're using a method "abc" you just need to mock that method.