2.1.0 • Published 2 years ago

openapi-nodegen-mem-mongo-loader v2.1.0

Weekly downloads
44
License
-
Repository
github
Last release
2 years ago

License | Dependencies | Codecov Coverage | Build Status

openapi-nodegen-mem-mongo-loader

Table of Contents generated with DocToc

A simple helper, setup helper and stop helper.

Handy for usage in jest tests, beforeAll and afterAll... but also/mainly.. I didn't want to write tests for this in my APIs or ignore in APIs jest config files.

Perquisites

It assumes you use mongoose, should be installed in your API. It is marked as a peer dep in this package.json file.

It does not assume you install mongodb-memory-server so installed as a dependency to this package.

Example

import OpenapiNodegenMemMongoLoader from 'openapi-nodegen-mem-mongo-loader';
describe('registerEmailPost domain', () => {

  beforeAll(async () => {
    await OpenapiNodegenMemMongoLoader.setup();
  });

  afterAll(async () => {
    await OpenapiNodegenMemMongoLoader.teardown();
  });
  // add some tests
})

Contribution

Pull requests welcomed as always.

2.1.0

2 years ago

2.0.0

3 years ago

1.0.9

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago