Mocha is a unittest framework for Node. In this document, we explain how you can test your javascript code and also your HTTP servers.
Use npm
to install Mocha:
npm install mocha
Mocha is a unittest framework for Node. In this document, we explain how you can test your javascript code and also your HTTP servers.
Use npm
to install Mocha:
npm install mocha
/* | |
Find all companies that people with lastname "Robertson" have founded | |
*/ | |
var mongoose = require('mongoose'); | |
var PersonSchema = new mongoose.Schema { | |
firstname: String, | |
lastname: String | |
}; | |
var Person = mongoose.model('Person', PersonSchema); |