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

@nodepit/jest-mongodb-downloader

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodepit/jest-mongodb-downloader

Script which simply downloads MongoDB as configured in `jest-mongodb-config.js`; useful for Docker caching.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

jest-mongodb-downloader

When being run, this script simply downloads the MongoDB version defined in jest-mongodb-config.js.

Why?

But jest-mongodb does this automatically upon start, so why would you want to do this? -- When explicitly triggering the download, you can make use of Docker’s caching, and avoid downloading MongoDB again and again if you just modified some source code.

Usage

  1. Install with yarn add @nodepit/jest-mongodb-downloader -D

  2. Add the following line to your Dockerfile before running the tests and copying the source code (make sure that jest-mongodb-config.js is already in the image).

    Add MONGOMS_DISABLE_POSTINSTALL to prevent downloading the default version of MongoDB and only install the version which is specified in the jest-mongodb-config.js.

    ENV MONGOMS_DISABLE_POSTINSTALL=1
    RUN yarn
    COPY jest-mongodb-config.js ./
    RUN yarn run jest-mongodb-downloader
    
  3. Give a GitHub star to say “Thank you, NodePit!”


Copyright nodepit.com, 2020.

Keywords

FAQs

Package last updated on 14 Jul 2020

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