jest-environment-mongodb-ephemeral
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

jest-environment-mongodb-ephemeral

npm version lerna

This package provides a wrapper around jest-environment-mongodb with the storageEngine setting preconfigured to ephemeralForTest.

This makes it possible to set the storage engine on a per test file basis via docblocks, without setting up Jest projects.

Installation

NPM

npm install --save-dev mongodb-memory-server jest-environment-mongodb-ephemeral

Yarn

yarn add --dev mongodb-memory-server jest-environment-mongodb-ephemeral

Usage

By adding a @jest-environment docblock at the top of a test file, you can specify mongodb-ephemeral to be used for all tests in that file:

/**
 * @jest-environment mongodb-ephemeral
 */

This overrides any environment set by testEnvironment in the Jest configuration file.

Additionally, any instance.storageEngine option provided by testEnvironmentOptions will be overridden with ephemeralForTest. All other options provided by testEnvironmentOptions will be in effect.

See also

Package Sidebar

Install

npm i jest-environment-mongodb-ephemeral

Weekly Downloads

2

Version

1.0.5

License

MIT

Unpacked Size

5.31 kB

Total Files

7

Last publish

Collaborators

  • lirbank
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy