
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
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.
Install Goosemock with npm
npm install goosemock
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.
FAQs
Package for mocking mongoose
The npm package goosemock receives a total of 6 weekly downloads. As such, goosemock popularity was classified as not popular.
We found that goosemock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.