1.5.1 • Published 6 years ago

goosemock v1.5.1

Weekly downloads
17
License
ISC
Repository
github
Last release
6 years ago

Goosemock

npm version npm

Goosemock is mongoose mocking framework. This package was created because we needed to write unit tests on a backend that used mongoose and we needed something to mock the behavior of mongoose but in a dynamic way. It is essentially an in memory database but without the need for a even a database server or any installations. All mongoose functions affect in-memory data data structures.

Installation

Install Goosemock with npm

npm install goosemock

Usage

Using goosemock is simple. Simply require and run it after mongoose like so:

const mongoose = require('mongoose')
const goosemock = require('goosemock')

goosemock()

Now all calls to mongoose functions will be executed in-memory. Note also that even mongoose.connect() will no longer be able to connect to the server as it is intercepted by goosemock.

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago