nestjs-addons/in-memory-db

Feature: e2e tests

wesleygrimes opened this issue ยท 2 comments

Is your feature request related to a problem? Please describe.
Currently, this module is not tested in an integration, e2e scenario.

Describe the solution you'd like
We need to implement e2e testing.

  • Create top-level folder named e2e
  • Generate nest application using nest cli inside the e2e folder named test-app
  • Define an import alias for @nestjs-addons/in-memory-db in the apps tsconfig.json file, pointing the path up to the parent lib/ directory. So that we can simulate real-world use.
  • Update app.module.ts to import the InMemoryDBModule and register as forRoot
  • Update app.controller.ts to do the following:
    • Inject InMemoryDBService into the constructor
    • Call the createMany method in the constructor to generate several example records
    • Define actions/endpoints for all public methods on the service, both sync and async
  • Update the included nested e2e folder with tests to verify that each action/endpoint returns the expected values.

Updated suggested implemention

๐ŸŽ‰ This issue has been resolved in version 1.7.3 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€