{"library":"vitest-mms","type":"library","category":null,"description":"vitest-mms (vitest-mongodb-memory-server) provides seamless integration of mongodb-memory-server with Vitest for efficient and isolated database testing. It allows developers to spin up an in-memory MongoDB instance for each test run or globally, ensuring a clean state. The library, currently at version 0.2.7, is in active development with frequent minor releases, indicating a rapid iteration cycle. Its key differentiators include pre-configured global setup hooks and dedicated test helpers (`setupDb`, `setupMongooseConnection`) for both the `mongodb` native driver and `mongoose` ODM, significantly reducing boilerplate. It also extends Vitest's test context, providing direct access to the `db` object or `mongoose` connection within test functions, simplifying interaction with the temporary database. This approach helps maintain test isolation and speeds up test execution compared to relying on external database instances.","language":"javascript","status":"active","version":"0.2.7","tags":["javascript","test","vite","vitest","mock","mongodb","mongoose","mongodb-memory-server"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vitest-mms","imports":["import 'vitest-mms/globalSetup'","import { setupDb } from 'vitest-mms/mongodb/helpers'","import { mssTest } from 'vitest-mms/mongodb/test'","import { setupMongooseConnection } from 'vitest-mms/mongoose/helpers'"]},{"cmd":"yarn add vitest-mms","imports":[]},{"cmd":"pnpm add vitest-mms","imports":[]}],"homepage":null,"github":"https://github.com/danielpza/vitest-mms","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vitest-mms","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vitest-mms/compatibility"}}