test your nodejs code

test your nodejs code

an opinionated introduction by Damien Klinnert

9809d0f32f9e4e3f4b14ce26400c0866?s=128

damienklinnert

September 27, 2012
Tweet

Transcript

  1. test your nodejs code an opinionated introduction by Damien Klinnert

    1 Donnerstag, 27. September 12
  2. whois damienklinnert student of computer science works at doctape jsdev

    since beginning of 2012 follow me @damienklinnert 2 Donnerstag, 27. September 12
  3. unit tests??? 3 Donnerstag, 27. September 12

  4. what is it? 4 Donnerstag, 27. September 12

  5. advantages of unit tests JS is a dynamic language additional

    lines of code, but less errors continous integration -> less errors over time NOT THE ANSWER TO EVERYTHING 5 Donnerstag, 27. September 12
  6. test your nodejs code 6 Donnerstag, 27. September 12

  7. tools mocha should npm couchviews couchpenter nock travis-ci 7 Donnerstag,

    27. September 12
  8. tools/mocha feature-rich JavaScript test framework many different test outputs can

    create documentation only a few keywords to remember like: describe(), it(), before(), after(), beforeEach(), afterEach() 8 Donnerstag, 27. September 12
  9. tools/should expressive, readable, test framework agnostic, assertion library extends the

    Object prototype should … exist, have.keys, equal, throwError() 9 Donnerstag, 27. September 12
  10. tools/npm npm comes with script support no need for makefiles

    for common tasks like "run all tests" or "generate docs" 10 Donnerstag, 27. September 12
  11. demo time 11 Donnerstag, 27. September 12

  12. tools/couchviews Store and load CouchDB views to / from your

    file system for easier setup of new databases 12 Donnerstag, 27. September 12
  13. tools/couchpenter CouchDB database and document setup tool CLI to setup

    new couchdb‘s from a json file 13 Donnerstag, 27. September 12
  14. tools/nock HTTP HTTP mocking library create api test environments 14

    Donnerstag, 27. September 12
  15. tools/travis-ci A hosted continuous integration service for the open source

    community. 15 Donnerstag, 27. September 12
  16. reading http:/ /visionmedia.github.com/mocha/ https:/ /github.com/visionmedia/should.js/ https:/ /npmjs.org/doc/ https:/ /github.com/damienklinnert/couchviews https:/

    /github.com/cliffano/couchpenter https:/ /github.com/flatiron/nock http:/ /travis-ci.org/ 16 Donnerstag, 27. September 12
  17. thank you 17 Donnerstag, 27. September 12