Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Chaplin & TDD BDD

Rendez edited this page Jan 7, 2013 · 5 revisions

Current testing environment

Chaplin uses the combination Mocha+Sinon+Express.js in its test suite.

While different set-ups will work as well, one needs to determine what is best fitted for the purpose of each application. Oftentimes, integration tests are needed, while others mere acceptance/unit tests suffice.

Setting up environments

Tutorial: Chaplin TDD set-up with Buster.js and Travis-CI:

Questions:

  • Q: What are the advantages of Buster.js over Mocha?
  • A: Buster.js supports different testing 'environments', just like Mocha, but most importantly, it allows you to run your test in every browser through the console, via its node.js suite runner, which is great for easy testing of continuous integration in multiple browsers. Also Buster.js provides a set of very useful extensions that fit really well with any Chaplin application: AMD support, automatic Sinon sandboxing and also auto-test feature to continuously run tests in your changed test files. On top of all this, you can use Buster.js as the test framework for your headless browser requests too, see http://blog.knuthaugen.no/2012/09/headless-tests-with-buster-and-phantom/.