Feature: e2e tests
wesleygrimes opened this issue ยท 2 comments
wesleygrimes commented
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 namedtest-app
- Define an import alias for
@nestjs-addons/in-memory-db
in the appstsconfig.json
file, pointing the path up to the parentlib/
directory. So that we can simulate real-world use. - Update
app.module.ts
to import theInMemoryDBModule
and register asforRoot
- 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
- Inject
- Update the included nested
e2e
folder with tests to verify that each action/endpoint returns the expected values.
wesleygrimes commented
Updated suggested implemention
wesleygrimes commented
๐ This issue has been resolved in version 1.7.3 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐