GithubHelp home page GithubHelp logo

baksha2008 / testing-nestjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jmcdo29/testing-nestjs

0.0 1.0 0.0 5.39 MB

A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!

License: MIT License

JavaScript 1.06% TypeScript 97.07% HTML 0.68% Dockerfile 0.84% Shell 0.23% Handlebars 0.12%

testing-nestjs's Introduction

testing-nestjs

Sponsor

testing-nestjs is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial

GitAds

Status

Commitizen friendly Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Actions Status Coffee

A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!

Project Structure

Each folder is a fully functional Nest application on its own. All you need to do after cloning the repository is move into the folder, install the dependencies, and test! Or you could just, you know, look at the test on GitHub too, no big deal.

Motivation

I've noticed a lot of people seem to get stuck on testing, and how to do it using the utilities given to us by Nest. Hopefully with a community driven repository of tests it will help others get a better understanding and feel for how to get tests running.

Please Note

This is not necessarily the Nest canonical way to test an application, nor is it the only way in any scenario. I will do my best to show different ways to run tests, but I will more than likely miss certain ways of running the tests, whether it is mocking in a specific way or otherwise. Again, this is a community maintained project and not a part of the official documentation. If you find other ways to test applications, great, I'd love to see them, but please do not think this is the only way.

Running the Project

  1. git clone https://github.com/jmcdo29/testing-nestjs.git
  2. cd testing-nestjs/<folderName>
  3. npm install OR yarn add
  4. npm run test OR yarn test

Contributing

Did I miss your favorite topic? Did I miss out on something you absolutely need tested? Well then open an issue, or better yet, a pull request! I'll be happy to look over any topics and try to help figure out how to test them or to merge any PRs that add to the value of the repository. If you do end up making a pull request, please add a screenshot of the test coverage so others can see how well the tests run. The complex-sample branch has a good example.

Change log

The change log can be found on the Releases page.

Authors and license

Jay McDoniel and contributors. Thanks to everyone who's helping with this effort!

MIT License, see the included License.md file.

testing-nestjs's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar jmcdo29 avatar rostgoat avatar malcolm-kee avatar jeffminsungkim avatar ddehghan avatar wonderpanda avatar

Watchers

James Cloos avatar

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.