New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-in-memory

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-in-memory

MongoDB compatible in-memory database for unit testing using TingoDB.

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
1
Weekly downloads
 
Created
Source

mongodb-in-memory

MongoDB compatible in-memory database for unit testing using TingoDB.

This package is a thin wrapper around TingoDB. It converts TingoDb's API to Promise API and adds methods that you can find in the MongoDB Node.js package to the collection.

Usage

import { createDb } from 'mongodb-in-memory'

const db = createDb()
demo()

async function demo () {
  const users = db.collection('users')
  const userId = (await users.insertOne({name: 'Jonas'})).insertedId
  const user = await users.findOne({_id: userId})
  await users.updateOne({_id: userId}, {$set: {name: 'Tom'}})
}

FAQs

Package last updated on 05 Nov 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc