Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.54 KB

README.md

File metadata and controls

62 lines (42 loc) · 1.54 KB

Example app showing how to setup a test environment for an express.js application

It uses cucumber.js with zombie.js for integration testing, mocha with should.js for unit testing on the server side, and jasmine with sinon for unit testing on the client side.

Install

$ git clone git://github.com/olivoil/NodeBDD.git
$ cd NodeBDD
$ npm install --dev

The Makefile defines commands to run the different kinds of tests:

Run cucumber features

$ make cucumber

If you are using vim, you might find it helpful to map a key to run them:

:map <Leader>f :w\|!clear && make cucumber<cr>

Run server-side specs

$ make spec

If you are using vim, you might find it helpful to map a key to run them:

:map <Leader>t :w\|!clear && make spec<cr>

Run client-side specs

$ make spec-client

If you are using vim, you might find it helpful to map a key to run them:

:map <Leader>c :w\|!make spec-client<cr>

TODO

  • Example client-side tests, stubbing the server side with sinon
  • Figure out how to make should.js work in the browser, then replace jasmine by mocha
  • Setup performance tests
  • Setup test coverage reporting
  • cli reporting for client-side specs, maybe using Phantomjs?
  • Browser Interface for all test reporting