systemic-mongodb-memory-server

1.0.0 • Public • Published

systemic-mongodb-memory-server

A systemic mongodb-memory-server component for testing without docker or dedicated mongodb servers.

This component create a temporal server for testing and server is destroyed when tests are finished.

Check configuration options for mongodbMemoryServer at official mongodb-memory-server documentation.

Usage

const System = require('systemic');
const mongodb = require('mongodb-memory-server');
const config = {
  mongodbMemoryServer: {
    instance: {
      db_name: 'test-db',
    },
  },
};

new System()
  .add('config', config, { scoped: true })
  .add('mongodb', mongodb())
  .dependsOn('config')
  .start((err, components) => {
    // Do your tests
  });

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i systemic-mongodb-memory-server

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.72 kB

    Total Files

    4

    Last publish

    Collaborators

    • guidesmiths_bot
    • feliun
    • ulisesgascon
    • cressie176