What am I looking for?
• It should be easy!
• Browser support
• Integrate with CI
• Born async
Nodeunit
• Pros
– Simple and easy to learn
– Sandbox feature, great to test client-side code
• Cons
– Missing high level assertions
– Do not allow groups inside groups
– Force to call done() for testcases and callback() for setup/teardown
every time;
Vows
• Pros
– BDD Style (clean and meaningful syntax)
– Extends the node assertions
– The tests could be nested or parallelized
– Great output when the test fail.
– Play nice with coffee script
• Cons
– Topic; Batches; Context can drive you crazy when begging
– No built-in spies
– Do not have browser support
Mocha
• Pros
– Different DSLs “interfaces” (TDD, BDD, Expect, qUnit)
– Browser support
– Highlight slow tests
– String diff support
– Async tests: You don’t need to call “done” every time like nodeunit does.
– before[Each](); after[Each](); could be async as well
– Play nice with coffee script
– Fun reports
• Cons
– Do not paralyze tests (I’m not sure it’s a bad thing, cuz it can cause
false positive)
Jasmine-node
• Pros
– Long time on the market
– Excellent browser support (fixtures and etc)
• Cons
– WaitFor, although the jasmine-node brings an alternative.
– It’s not maintained for the same jasmine team/pivotal
Buster
• Pros
– Hybrid, node and browser testing.
– Shipped with xUnit and BDD style
– jsTestDriver like to run client-side tests
– It’s doesn’t comes with spies but plays nice with Sinon.JS (created by
the same guy. Tks Christian J.)
– Clear roadmap
• Cons
– Beta =/. It might brake your tests before becomes stable.