Test your nodejs code
Upcoming SlideShare
Loading in...5

Test your nodejs code



an opinionated introduction by Damien Klinnert

an opinionated introduction by Damien Klinnert



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Test your nodejs code Test your nodejs code Presentation Transcript

    • test your nodejs code an opinionated introduction by Damien Klinnert 1Freitag, 23. November 12
    • whois damienklinnert student of computer science works at doctape jsdev since beginning of 2012 follow me @damienklinnert 2Freitag, 23. November 12
    • unit tests??? 3Freitag, 23. November 12
    • what is it? 4Freitag, 23. November 12
    • 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 5Freitag, 23. November 12
    • test your nodejs code 6Freitag, 23. November 12
    • tools mocha couchviews should couchpenter npm nock travis-ci 7Freitag, 23. November 12
    • tools/mocha feature-rich only a few keywords JavaScript test to remember like: framework describe(), it(), many different test before(), after(), outputs beforeEach(), afterEach() can create documentation 8Freitag, 23. November 12
    • tools/should expressive, readable, test framework agnostic, assertion library extends the Object prototype should … exist, have.keys, equal, throwError() 9Freitag, 23. November 12
    • tools/npm npm comes with script support no need for makefiles for common tasks like "run all tests" or "generate docs" 10Freitag, 23. November 12
    • demo time 11Freitag, 23. November 12
    • tools/couchviews Store and load CouchDB views to / from your file system for easier setup of new databases 12Freitag, 23. November 12
    • tools/couchpenter CouchDB database and document setup tool CLI to setup new couchdb‘s from a json file 13Freitag, 23. November 12
    • tools/nock HTTP HTTP mocking library create api test environments 14Freitag, 23. November 12
    • tools/travis-ci A hosted continuous integration service for the open source community. 15Freitag, 23. November 12
    • 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/ 16Freitag, 23. November 12
    • thank you 17Freitag, 23. November 12