2.0.9 • Published 9 years ago

mongoose-erase v2.0.9

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
9 years ago

mongoose-erase

Build Status Coverage Status Dependency Status

NPM

Erase collections, models and schemas for unit testing with mongoose

Usage

With mocha, a unit test code that wipes the database before each test could look like this:

var mongoose = require('mongoose');
var erase = require('mongoose-erase');

describe('yourFunction()', function() {

  beforeEach(erase.connectAndErase(mongoose, 'mongodb://localhost/test'));

  it('should do something', function() {});

});
2.0.9

9 years ago

2.0.8

10 years ago

2.0.7

10 years ago

2.0.6

10 years ago

2.0.5

10 years ago

2.0.4

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago