-
Notifications
You must be signed in to change notification settings - Fork 5
QA Tests and Continuous Integration
We have implemented a couple of very simple tests relying on mocha in order to start continuous integration.
Continuous integration for nodejs with Travis-CI is documented.
First, sign up to Travis-CI with your GitHub account and enable the repository you need to track for continuous integration. If organization repositories are not listed, go to the organization members list and make your membership public.
Second, add a text file named .travis.yml at the root of the repository with teh following content:
language: node_js
node_js:
- "0.11"
- "0.10"
services:
- mongodbThird, make sure you have a test command by calling npm test in a terminal session. This actually refers to the scripts object in package.json:
"scripts": {
"start": "node server.js",
"test": "mocha"
},Finally, all npm package modules need to be installed locally. If you have installed mocha globally to benefit from the command line, you need to duplicate it locally in package.json to be installed by Travis-CI using npm install:
"devDependencies": {
"mocha": "^1.18.2",
"supertest": "^0.12.1"
},Copyright © 2013-2014 Memba Sarl. All rights reserved.