2.0.9 • Published 8 years ago

mongoose-erase v2.0.9

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
8 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

8 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.0

9 years ago