Question

I see articles using Chai, but should.js comes from TJ Holowaychuk, maker of Express and Mocha, which is an excellent pedigree. Should I use Chai or should.js with Mocha for a new Node.js server-side only project?

Was it helpful?

Solution

In the end there are only few differences in the API. Generally I would tend to chai.js because:

  • development is more active (pull requests are ignored at should.js)
  • chai.expect is more consistent as possible to use on "undefined" and "null"

However it does not make a big difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top