Test interceptor

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/Nestjs_framework

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Sonar - Write Clean JavaScript Code. Always.
  • nest-api-example

    Example of an Restful API with Nest.js and TypeORM

    Example https://github.com/leosuncin/nest-api-example/blob/master/src/auth/interceptors/token.interceptor.spec.ts

  • jest-mock-extended

    Type safe mocking extensions for Jest https://www.npmjs.com/package/jest-mock-extended

    You can use something like jest-mock-extended or @golevelup/ts-jest to mock it, and whether your interceptor has dependencies or not, can be more complex or simpler how you instance it.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • testing-nestjs

    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!

    Example https://github.com/jmcdo29/testing-nestjs/blob/8519ae7043d1dde5ae12a5d8f8ab02ea3c3c2fcf/apps/complex-sample/src/cat/cat.interceptor.spec.ts

  • node-mocks-http

    Mock 'http' objects for testing Express routing functions

    It depends of how you mock the request and response that you passed to ExecutionContext because the response should be modified. I recommend you to use node-mocks-http

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts