0.0.2 • Published 10 years ago

mongoose-mill v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

mongoose-mill

Build Status Code Climate David DM

Mongoose factories for tests

Install

npm install mongoose-mill

Usage

var mongoose = require('mongoose');
var factory = require('mongoose-mill')(mongoose);

var userf = factory('User', {provider: 'github'});
var user = userf({name: 'Foo', oauth_id: '12345'}),

user
  .then(function(resource) {
    // resource => {
    //   provider: 'github',
    //   name: 'Foo',
    //   oauth_id: '12345'
    // }
  });

Factory functions (eg. userf) when invoked will return a Promise.

License

MIT