/node-mongoose-mocha-demo

A demo showing how to use Node.js, Mongoose.js, and Mocha.ja together

Primary LanguageJavaScript

Node, Mongoose, and Mocha Together!

A simple demo showing how to contruct your Node.js models using Mongoose for testing with Mocha.js.

Introduction

I don't want to say this is the holy grail for declaring your models with Node.js for testing with Mocha.js. But after reading and testing a lot myself I feel like it's a pretty efficient solution to the problem. Besides, it's a good placeholder for myself to learn and experiment more.

Installation

Running / Testing

After you have the repository cloned and all node modules installed, take a peep at the code in both the models folder and test folder. I have put comments in the code explaining what is going on. To actually run the test and see a sample output of the Mocha.js test results type: npm test

That's it!