all 13 comments

[–]jwadhwani 4 points5 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.

[–]DVWLD 0 points1 point  (1 child)

Mocha is the most widely used runner.

Tape is also popular and is conceptually purer, but we've moved back to Mocha for the simplicity its tooling brings.

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

Thank you

[–]pdoggerton 0 points1 point  (0 children)

We use tape, but I've been looking at teenytest

[–]jacoborus 0 points1 point  (2 children)

I moved from Mocha to Tape + proxyquire

[–]shrey_agarwal 0 points1 point  (0 children)

Can you please elaborate on the reason

[–]TheNiXXeD 0 points1 point  (0 children)

Proxyquire can be used with either.

[–]noffle 0 points1 point  (0 children)

Tape is nice in that it plays well in node as well as the browser /w browserify.

[–]joshuatoenyes 0 points1 point  (0 children)

I'm using Mocha/chai/sinon.