to describe the behavior of an app 3. Create code based on the behavior descriptions 4. Automate the testing of your code (feedback/ regression testing)
build a skeleton npm install -g mocha; mocha init . or • Just download files from the repositories https://raw.githubusercontent.com/visionmedia/mocha/ master/mocha.css https://raw.githubusercontent.com/visionmedia/mocha/ master/mocha.js
/ be / is / a ... • true • include • true • false • exist • undefined • null • empty • equals • above • below • (and many more...) For all the BDD matchers, see: http://chaijs.com/api/bdd/ For the TDD-style matchers, see: http://chaijs.com/api/assert/
the skill of perjured Sinon, the thing was credited, and we were trapped, by his wiliness, and false tears, we, who were not conquered by Diomede, or Larissan Achilles, nor by the ten years of war, nor those thousand ships. -Vergil, Aeneid II:195-199
no longer providing value, no matter whether you originally planned to keep them or not. We tend to treat tests as these holy creatures that live blameless, irreproachable lives once they have sprung into existence. Not so. The maintenance required to keep a test running weighs against its value in further development. Sometimes these lines cross, and the test simply becomes a burden on the project. Having the skill and experience to recognize a burdensome test is something we should be bringing to our clients, as well as the fortitude to rewrite it, rethink it, or delete it. - Adam Milligan, Pivotal Labs