Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2e tests for mongo-sample] #1037

Open
Mnigos opened this issue Dec 3, 2020 · 6 comments
Open

[e2e tests for mongo-sample] #1037

Mnigos opened this issue Dec 3, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Mnigos
Copy link
Contributor

Mnigos commented Dec 3, 2020

Just a e2e tests using mongo
A clear and concise description of what feature you want to be shown tests for (e.g. Authentication):
I tried to create e2e tests by when i started it it's connected to db and adding this data from tests to my db. Should i use mockingoose?

@Mnigos Mnigos added the enhancement New feature or request label Dec 3, 2020
@jmcdo29
Copy link
Owner

jmcdo29 commented Dec 3, 2020

An e2e test usually should be using a database, that way you are testing the entire flow, from the request coming in, to the data being saved, to the data being retrieved. Usually it's also preferable to use a different database for testing that your dev or production database to ensure you don't have any collisions or pollution of your database. I can try to add an e2e sample for mongo though

@omermorad
Copy link

Hey guys :)

@jmcdo29 well done with the repo!
Actually, when I looked at the tests I was looking exactly for what you have described here.

Thought about adding this e2e test, from the controller to an in-memory DB, what do you think?

@jmcdo29
Copy link
Owner

jmcdo29 commented Feb 6, 2021

@omermorad thanks for looking to continue! You can either use an in memory database, or you can add the mongo image to the docker-compose. Either way I look forward to the contribution

@omermorad
Copy link

Great, I will work on something and send you a PR

@omermorad
Copy link

@jmcdo29
Copy link
Owner

jmcdo29 commented Feb 6, 2021

Add a new cats.e2e-spec.ts. I'm pretty sure that's what the TypeORM sample does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants