Giter VIP home page Giter VIP logo

Comments (6)

jmcdo29 avatar jmcdo29 commented on July 22, 2024 2

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

from testing-nestjs.

jmcdo29 avatar jmcdo29 commented on July 22, 2024 1

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

from testing-nestjs.

omermorad avatar omermorad commented on July 22, 2024

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?

from testing-nestjs.

jmcdo29 avatar jmcdo29 commented on July 22, 2024

@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

from testing-nestjs.

omermorad avatar omermorad commented on July 22, 2024

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

from testing-nestjs.

omermorad avatar omermorad commented on July 22, 2024

Should I modify this test? Or work on a new one?

https://github.com/jmcdo29/testing-nestjs/blob/dff1168a019bd30458b1d8bae58bf8985a267095/apps/mongo-sample/test/app.e2e-spec.ts

from testing-nestjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.