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

1.0.5 • Public • Published

jest-environment-mongodb-wiredtiger

npm version lerna

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

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-wiredtiger

Yarn

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

Usage

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

/**
 * @jest-environment mongodb-wiredtiger
 */

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

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

See also

Package Sidebar

Install

npm i jest-environment-mongodb-wiredtiger

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

5.3 kB

Total Files

7

Last publish

Collaborators

  • lirbank