Mongoose Validation and Virtual Fields

Mongoose, MongoDB ORM for node.js, allows you to create virtual fields. However, virtual fields cannot be validated using the standard method of field validation. I will first explain how to add validation to normal, non-virtual fields, and then describe a method for handling virtual fields.

[ read more... >

Comments

Serial Expresso Testing with Mongo Fixtures

Expresso is a test runner for Node.js. It boasts “high speed parallel testing”. It means it can run your whole test suite of a couple of thousands of tests in less than a second… but this post is not about that. This post is about taking it slow, and running tests one by one like you might be used to from other environments (Python, anyone?).

[ read more... >

Comments