repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/multiple-providers.spec.ts
integration/injector/e2e/multiple-providers.spec.ts
import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { MultipleProvidersModule } from '../src/multiple-providers/multiple-providers.module'; describe('Multiple providers under the same token ("each" feature)', () => { describe('get()', () => { it('should return an array of providers', as...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/circular.spec.ts
integration/injector/e2e/circular.spec.ts
import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { CircularModule } from '../src/circular/circular.module'; import { CircularService } from '../src/circular/circular.service'; import { InputService } from '../src/circular/input.service'; describe('Circular dependency', () => { it('should...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/circular-structure-dynamic-modules.spec.ts
integration/injector/e2e/circular-structure-dynamic-modules.spec.ts
import { expect } from 'chai'; import { Test } from '@nestjs/testing'; import { CircularModule } from '../src/circular-structure-dynamic-module/circular.module'; import { InputService } from '../src/circular-structure-dynamic-module/input.service'; describe('Circular structure for dynamic modules', () => { it('shoul...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/default-values.spec.ts
integration/injector/e2e/default-values.spec.ts
import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { DefaultsModule } from '../src/defaults/defaults.module'; import { DefaultsService } from '../src/defaults/defaults.service'; describe('Injector', () => { describe('when optional', () => { it(`should make use of default assignments`, ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/introspection.spec.ts
integration/injector/e2e/introspection.spec.ts
import { Scope } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import { ScopedModule, STATIC_FACTORY } from '../src/scoped/scoped.module'; import { ScopedService } from '../src/scoped/scoped.service'; import { Trans...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/injector/e2e/optional-factory-provider-dep.spec.ts
integration/injector/e2e/optional-factory-provider-dep.spec.ts
import { Scope } from '@nestjs/common'; import { UnknownDependenciesException } from '@nestjs/core/errors/exceptions/unknown-dependencies.exception'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; describe('Optional factory provider deps', () => { describe('when dependency is optional', () =>...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/cors/src/app.controller.ts
integration/cors/src/app.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller() export class AppController { @Get() getGlobals() { return ''; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/cors/src/app.module.ts
integration/cors/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; @Module({ controllers: [AppController], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/cors/e2e/express.spec.ts
integration/cors/e2e/express.spec.ts
import { NestExpressApplication } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Express Cors', () => { let app: NestExpressApplication; const configs = [ { origin: 'example.com', ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/cors/e2e/fastify.spec.ts
integration/cors/e2e/fastify.spec.ts
import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe.skip('Fastify Cors', () => { let app: NestFastifyApplication; const configs = [ { o...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/auto-mock/src/foo.service.ts
integration/auto-mock/src/foo.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class FooService { foo() { console.log('foo called'); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/auto-mock/src/bar.service.ts
integration/auto-mock/src/bar.service.ts
import { Injectable } from '@nestjs/common'; import { FooService } from './foo.service'; @Injectable() export class BarService { constructor(private readonly foo: FooService) {} bar() { this.foo.foo(); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/auto-mock/test/bar.service.spec.ts
integration/auto-mock/test/bar.service.spec.ts
import { Test } from '@nestjs/testing'; import * as chai from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import * as sinon from 'sinon'; import { BarService } from '../src/bar.service'; import { FooService } from '../src/foo.service'; chai.use(chaiAsPromised); const { expect } = chai; describe('Auto-...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/app.module.ts
integration/hello-world/src/app.module.ts
import { Module } from '@nestjs/common'; import { HelloModule } from './hello/hello.module'; import { HostArrayModule } from './host-array/host-array.module'; import { HostModule } from './host/host.module'; @Module({ imports: [HelloModule, HostModule, HostArrayModule], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/host-array.controller.ts
integration/hello-world/src/host-array/host-array.controller.ts
import { Controller, Get, Header, HostParam, Param } from '@nestjs/common'; import { Observable, of } from 'rxjs'; import { HostArrayService } from './host-array.service'; import { UserByIdPipe } from './users/user-by-id.pipe'; @Controller({ path: 'host-array', host: [':tenant.example1.com', ':tenant.example2.com'...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/host-array.service.ts
integration/hello-world/src/host-array/host-array.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class HostArrayService { greeting(): string { return 'Host Greeting!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/host-array.module.ts
integration/hello-world/src/host-array/host-array.module.ts
import { Module } from '@nestjs/common'; import { HostArrayController } from './host-array.controller'; import { HostArrayService } from './host-array.service'; import { UsersService } from './users/users.service'; @Module({ controllers: [HostArrayController], providers: [HostArrayService, UsersService], }) export...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/dto/test.dto.ts
integration/hello-world/src/host-array/dto/test.dto.ts
import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; export class TestDto { @IsString() @IsNotEmpty() string: string; @IsNumber() number: number; }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/users/users.service.ts
integration/hello-world/src/host-array/users/users.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class UsersService { findById(id: string) { return { id, host: true }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host-array/users/user-by-id.pipe.ts
integration/hello-world/src/host-array/users/user-by-id.pipe.ts
import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; import { UsersService } from './users.service'; @Injectable() export class UserByIdPipe implements PipeTransform<string> { constructor(private readonly usersService: UsersService) {} transform(value: string, metadata: ArgumentMetadata) ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/hello.controller.ts
integration/hello-world/src/hello/hello.controller.ts
import { Controller, Get, Header, Param } from '@nestjs/common'; import { Observable, of } from 'rxjs'; import { HelloService } from './hello.service'; import { UserByIdPipe } from './users/user-by-id.pipe'; @Controller('hello') export class HelloController { constructor(private readonly helloService: HelloService) ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/hello.service.ts
integration/hello-world/src/hello/hello.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class HelloService { greeting(): string { return 'Hello world!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/hello.module.ts
integration/hello-world/src/hello/hello.module.ts
import { Module } from '@nestjs/common'; import { HelloController } from './hello.controller'; import { HelloService } from './hello.service'; import { UsersService } from './users/users.service'; @Module({ controllers: [HelloController], providers: [HelloService, UsersService], }) export class HelloModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/dto/test.dto.ts
integration/hello-world/src/hello/dto/test.dto.ts
import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; export class TestDto { @IsString() @IsNotEmpty() string: string; @IsNumber() number: number; }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/users/users.service.ts
integration/hello-world/src/hello/users/users.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class UsersService { findById(id: string) { return { id }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/hello/users/user-by-id.pipe.ts
integration/hello-world/src/hello/users/user-by-id.pipe.ts
import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; import { UsersService } from './users.service'; @Injectable() export class UserByIdPipe implements PipeTransform<string> { constructor(private readonly usersService: UsersService) {} transform(value: string, metadata: ArgumentMetadata) ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/errors/errors.controller.ts
integration/hello-world/src/errors/errors.controller.ts
import { BadRequestException, Controller, Get, Header } from '@nestjs/common'; @Controller() export class ErrorsController { @Get('sync') synchronous() { this.throwError(); } @Get('async') async asynchronous() { this.throwError(); } @Get('unexpected-error') @Header('Content-Type', 'applicatio...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/host.controller.ts
integration/hello-world/src/host/host.controller.ts
import { Controller, Get, Header, HostParam, Param } from '@nestjs/common'; import { Observable, of } from 'rxjs'; import { HostService } from './host.service'; import { UserByIdPipe } from './users/user-by-id.pipe'; @Controller({ path: 'host', host: ':tenant.example.com', }) export class HostController { constr...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/host.service.ts
integration/hello-world/src/host/host.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class HostService { greeting(): string { return 'Host Greeting!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/host.module.ts
integration/hello-world/src/host/host.module.ts
import { Module } from '@nestjs/common'; import { HostController } from './host.controller'; import { HostService } from './host.service'; import { UsersService } from './users/users.service'; @Module({ controllers: [HostController], providers: [HostService, UsersService], }) export class HostModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/dto/test.dto.ts
integration/hello-world/src/host/dto/test.dto.ts
import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; export class TestDto { @IsString() @IsNotEmpty() string: string; @IsNumber() number: number; }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/users/users.service.ts
integration/hello-world/src/host/users/users.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class UsersService { findById(id: string) { return { id, host: true }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/src/host/users/user-by-id.pipe.ts
integration/hello-world/src/host/users/user-by-id.pipe.ts
import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; import { UsersService } from './users.service'; @Injectable() export class UserByIdPipe implements PipeTransform<string> { constructor(private readonly usersService: UsersService) {} transform(value: string, metadata: ArgumentMetadata) ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/exclude-middleware.spec.ts
integration/hello-world/e2e/exclude-middleware.spec.ts
import { Controller, Get, INestApplication, MiddlewareConsumer, Module, Post, RequestMethod, } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; const RETURN_VALUE = 'test'; const MIDDLEWARE_VALUE = 'middlew...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware-execute-order.spec.ts
integration/hello-world/e2e/middleware-execute-order.spec.ts
import { Global, INestApplication, MiddlewareConsumer, Module, } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; const RETURN_VALUE_A = 'test_A'; const RETURN_VALUE_B = 'test_B'; const RETURN_VALUE_X = 'test_X'; const RETURN_VALUE_GLOBAL = 'test_GLOBAL'; @G...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware-fastify.spec.ts
integration/hello-world/e2e/middleware-fastify.spec.ts
import { Controller, Get, MiddlewareConsumer, Module, NestMiddleware, NestModule, Param, Query, Req, RequestMethod, } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/router-module-middleware.spec.ts
integration/hello-world/e2e/router-module-middleware.spec.ts
import { Controller, Get, INestApplication, MiddlewareConsumer, Module, } from '@nestjs/common'; import { RouterModule } from '@nestjs/core'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; const RETURN_VALUE = 'test'; const SCOPED_...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware-with-versioning.spec.ts
integration/hello-world/e2e/middleware-with-versioning.spec.ts
import { Controller, Get, INestApplication, MiddlewareConsumer, Module, RequestMethod, Version, VersioningOptions, VersioningType, VERSION_NEUTRAL, } from '@nestjs/common'; import { CustomVersioningOptions } from '@nestjs/common/interfaces'; import { Test } from '@nestjs/testing'; import * as reques...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/router-module.spec.ts
integration/hello-world/e2e/router-module.spec.ts
import { Controller, Get, INestApplication, Module } from '@nestjs/common'; import { RouterModule, Routes } from '@nestjs/core'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; describe('RouterModule', () => { let app: INestApplication; abstract class BaseController { @Get() ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/interceptors.spec.ts
integration/hello-world/e2e/interceptors.spec.ts
import { CallHandler, ExecutionContext, INestApplication, Injectable, NestInterceptor, } from '@nestjs/common'; import { APP_INTERCEPTOR } from '@nestjs/core'; import { Test } from '@nestjs/testing'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import * as request from 'supertest'; import ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/fastify-middleware-before-init.spec.ts
integration/hello-world/e2e/fastify-middleware-before-init.spec.ts
import { Controller, Get, Injectable, MiddlewareConsumer, Module, NestModule, } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; describe('Middleware before init (FastifyAdap...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/exceptions.spec.ts
integration/hello-world/e2e/exceptions.spec.ts
import { HttpStatus, INestApplication } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { RawServerDefault } from 'fastify'; import * as request from 'supertest'; import { ErrorsC...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/express-multiple.spec.ts
integration/hello-world/e2e/express-multiple.spec.ts
import { INestApplication } from '@nestjs/common'; import { ExpressAdapter } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import * as express from 'express'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Hello world (express instance with mul...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/fastify-adapter.spec.ts
integration/hello-world/e2e/fastify-adapter.spec.ts
import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { AppModule } from '../src/app.module'; describe('Hello world (fastify adapter)', () => { let app: NestFastifyApplication; beforeEach(async () => { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/fastify-multiple.spec.ts
integration/hello-world/e2e/fastify-multiple.spec.ts
/* Temporarily disabled due to various regressions import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { ApplicationModule } from '../src/app.module'; describe('Hello world (fastify adapter with multiple appli...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/express-instance.spec.ts
integration/hello-world/e2e/express-instance.spec.ts
import { INestApplication } from '@nestjs/common'; import { ExpressAdapter } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import * as express from 'express'; import * as request from 'supertest'; import { App } from 'supertest/types'; import { AppModule } from '../src/app.module'; describe(...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware-run-match-route.ts
integration/hello-world/e2e/middleware-run-match-route.ts
import { Controller, Get, INestApplication, Injectable, MiddlewareConsumer, NestMiddleware, Module, } from '@nestjs/common'; import { Test } from '../../../packages/testing'; import * as request from 'supertest'; import { expect } from 'chai'; /** * Number of times that the middleware was executed. */ ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/force-console.spec.ts
integration/hello-world/e2e/force-console.spec.ts
import { ConsoleLogger, INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; import * as sinon from 'sinon'; import { expect } from 'chai'; describe('ForceConsole Option', () => { let app: INestApplicati...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/guards.spec.ts
integration/hello-world/e2e/guards.spec.ts
import { INestApplication, Injectable, UnauthorizedException, } from '@nestjs/common'; import { APP_GUARD } from '@nestjs/core'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; @Injectable() export class AuthGuard { canActivate() { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/hello-world.spec.ts
integration/hello-world/e2e/hello-world.spec.ts
import * as request from 'supertest'; import { Test } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import { AppModule } from '../src/app.module'; describe('Hello world (default adapter)', () => { let server; let app: INestApplication; beforeEach(async () => { const module = awa...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware-class.spec.ts
integration/hello-world/e2e/middleware-class.spec.ts
import { Controller, Get, INestApplication, Injectable, MiddlewareConsumer, Module, RequestMethod, } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Response } from 'express'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; const INCLUDED_VALUE...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/middleware.spec.ts
integration/hello-world/e2e/middleware.spec.ts
import { Controller, Get, INestApplication, MiddlewareConsumer, Module, } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; const RETURN_VALUE = 'test'; const SCOPED_VALUE = 'test_scoped'; const WILDCARD_VALUE =...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/local-pipes.spec.ts
integration/hello-world/e2e/local-pipes.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Hello world (default adapter)', () => { let server; let app: INestApplication; beforeEach(async () => { const module = awa...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hello-world/e2e/exclude-middleware-fastify.spec.ts
integration/hello-world/e2e/exclude-middleware-fastify.spec.ts
import { Controller, Get, INestApplication, MiddlewareConsumer, Module, Post, RequestMethod, } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } f...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/use-body-parser/src/app.controller.ts
integration/nest-application/use-body-parser/src/app.controller.ts
import { Controller, Post, Req, RawBodyRequest } from '@nestjs/common'; import { IncomingMessage } from 'http'; @Controller() export class AppController { @Post() index(@Req() req: RawBodyRequest<IncomingMessage>) { return { raw: req.rawBody?.toString(), }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/use-body-parser/src/app.module.ts
integration/nest-application/use-body-parser/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; @Module({ controllers: [AppController], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/use-body-parser/e2e/express.spec.ts
integration/nest-application/use-body-parser/e2e/express.spec.ts
import { NestExpressApplication } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import { OptionsUrlencoded } from 'body-parser'; import { expect } from 'chai'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Body Parser (Express Application)', (...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/use-body-parser/e2e/fastify.spec.ts
integration/nest-application/use-body-parser/e2e/fastify.spec.ts
import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { AppModule } from '../src/app.module'; describe('Body Parser (Fastify Application)', () => { const moduleFixture = Test.createTestingModule({ impo...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/listen/src/app.controller.ts
integration/nest-application/listen/src/app.controller.ts
import { Controller, Get } from '@nestjs/common'; import { AppService } from './app.service'; @Controller() export class AppController { constructor(private readonly appService: AppService) {} @Get() getHello(): string { return this.appService.sayHello(); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/listen/src/app.module.ts
integration/nest-application/listen/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ controllers: [AppController], providers: [AppService], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/listen/src/app.service.ts
integration/nest-application/listen/src/app.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class AppService { sayHello(): string { return 'Hello World!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/listen/e2e/express.spec.ts
integration/nest-application/listen/e2e/express.spec.ts
import { INestApplication } from '@nestjs/common'; import { ExpressAdapter } from '@nestjs/platform-express'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import * as express from 'express'; import { AppModule } from '../src/app.module'; describe('Listen (Express Application)',...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/listen/e2e/fastify.spec.ts
integration/nest-application/listen/e2e/fastify.spec.ts
import { INestApplication } from '@nestjs/common'; import { FastifyAdapter } from '@nestjs/platform-fastify'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import { AppModule } from '../src/app.module'; describe('Listen (Fastify Application)', () => { let testModule: TestingMo...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/src/app.controller.ts
integration/nest-application/get-url/src/app.controller.ts
import { Controller, Get } from '@nestjs/common'; import { AppService } from './app.service'; @Controller() export class AppController { constructor(private readonly appService: AppService) {} @Get() getHello(): string { return this.appService.sayHello(); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/src/app.module.ts
integration/nest-application/get-url/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ controllers: [AppController], providers: [AppService], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/src/app.service.ts
integration/nest-application/get-url/src/app.service.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class AppService { sayHello(): string { return 'Hello World!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/e2e/utils.ts
integration/nest-application/get-url/e2e/utils.ts
import * as net from 'net'; export let port: number; export async function randomPort(): Promise<number> { const server = net.createServer(); return new Promise((resolve, reject) => { if (port) { resolve(port); } server.listen(0, () => { port = (server.address() as net.AddressInfo).port; ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/e2e/express.spec.ts
integration/nest-application/get-url/e2e/express.spec.ts
import { ExpressAdapter } from '@nestjs/platform-express'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import * as express from 'express'; import { AppModule } from '../src/app.module'; import { randomPort } from './utils'; describe('Get URL (Express Application)', () => { l...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/get-url/e2e/fastify.spec.ts
integration/nest-application/get-url/e2e/fastify.spec.ts
import { FastifyAdapter } from '@nestjs/platform-fastify'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import { AppModule } from '../src/app.module'; import { randomPort } from './utils'; describe('Get URL (Fastify Application)', () => { let testModule: TestingModule; let ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/src/express.module.ts
integration/nest-application/raw-body/src/express.module.ts
import { Module } from '@nestjs/common'; import { ExpressController } from './express.controller'; @Module({ controllers: [ExpressController], }) export class ExpressModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/src/express.controller.ts
integration/nest-application/raw-body/src/express.controller.ts
import { Controller, Post, RawBodyRequest, Req } from '@nestjs/common'; import { Request } from 'express'; @Controller() export class ExpressController { @Post() getRawBody(@Req() req: RawBodyRequest<Request>) { return { parsed: req.body, raw: req.rawBody!.toString(), }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/src/fastify.module.ts
integration/nest-application/raw-body/src/fastify.module.ts
import { Module } from '@nestjs/common'; import { FastifyController } from './fastify.controller'; @Module({ controllers: [FastifyController], }) export class FastifyModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/src/fastify.controller.ts
integration/nest-application/raw-body/src/fastify.controller.ts
import { Controller, Post, RawBodyRequest, Req } from '@nestjs/common'; import type { FastifyRequest } from 'fastify'; @Controller() export class FastifyController { @Post() getRawBody(@Req() req: RawBodyRequest<FastifyRequest>) { return { parsed: req.body, raw: req.rawBody!.toString(), }; } ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/e2e/express.spec.ts
integration/nest-application/raw-body/e2e/express.spec.ts
import { NestExpressApplication } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as request from 'supertest'; import { ExpressModule } from '../src/express.module'; describe('Raw body (Express Application)', () => { let app: NestExpressApplication; ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/raw-body/e2e/fastify.spec.ts
integration/nest-application/raw-body/e2e/fastify.spec.ts
import { NestFastifyApplication, FastifyAdapter, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { FastifyModule } from '../src/fastify.module'; describe('Raw body (Fastify Application)', () => { let app: NestFastifyApplication; beforeEach(async...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/global-prefix/src/app.controller.ts
integration/nest-application/global-prefix/src/app.controller.ts
import { Controller, Get, Post, Req } from '@nestjs/common'; @Controller() export class AppController { @Get('hello/:name') getHello(@Req() req): string { return 'Hello: ' + req.extras?.data; } @Get('params') getParams(@Req() req): any { return req.middlewareParams; } @Get('health') getHealth...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/global-prefix/src/app.module.ts
integration/nest-application/global-prefix/src/app.module.ts
import { MiddlewareConsumer, Module, RequestMethod } from '@nestjs/common'; import { AppController } from './app.controller'; export const MIDDLEWARE_VALUE = 'middleware'; export const MIDDLEWARE_PARAM_VALUE = 'middleware_param'; @Module({ controllers: [AppController], }) export class AppModule { private count = ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/global-prefix/e2e/global-prefix.spec.ts
integration/nest-application/global-prefix/e2e/global-prefix.spec.ts
import { INestApplication, RequestMethod } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule, MIDDLEWARE_PARAM_VALUE, MIDDLEWARE_VALUE, } from '../src/app.module'; describe('Global prefix', () => { let server; let app: INestApplication; ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/sse/src/app.controller.ts
integration/nest-application/sse/src/app.controller.ts
import { Controller, MessageEvent, Sse } from '@nestjs/common'; import { interval, map, Observable } from 'rxjs'; @Controller() export class AppController { @Sse('sse') sse(): Observable<MessageEvent> { return interval(1000).pipe( map(() => ({ data: { hello: 'world' } }) as MessageEvent), ); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/sse/src/app.module.ts
integration/nest-application/sse/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; @Module({ controllers: [AppController], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/sse/e2e/express.spec.ts
integration/nest-application/sse/e2e/express.spec.ts
import { NestExpressApplication } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { EventSource } from 'eventsource'; import { AppModule } from '../src/app.module'; describe('Sse (Express Application)', () => { let app: NestExpressApplication; let even...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/sse/e2e/fastify.spec.ts
integration/nest-application/sse/e2e/fastify.spec.ts
import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { EventSource } from 'eventsource'; import { AppModule } from '../src/app.module'; describe('Sse (Fastify Application)', () => { let app: NestFastifyAp...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/app-locals/src/app.controller.ts
integration/nest-application/app-locals/src/app.controller.ts
import { Controller, Get, Req } from '@nestjs/common'; import { Request } from 'express'; @Controller() export class AppController { @Get() getGlobals(@Req() req: Request) { return req.app.locals; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/app-locals/src/app.module.ts
integration/nest-application/app-locals/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; @Module({ controllers: [AppController], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/nest-application/app-locals/e2e/express.spec.ts
integration/nest-application/app-locals/e2e/express.spec.ts
import { NestExpressApplication } from '@nestjs/platform-express'; import { Test, TestingModule } from '@nestjs/testing'; import { expect } from 'chai'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('App-level globals (Express Application)', () => { let moduleFixture: ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/app.module.ts
integration/websockets/src/app.module.ts
import { Module } from '@nestjs/common'; import { ApplicationGateway } from './app.gateway'; @Module({ providers: [ApplicationGateway], }) export class ApplicationModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/ws-path2.gateway.ts
integration/websockets/src/ws-path2.gateway.ts
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; @WebSocketGateway({ path: '/ws-path', }) export class WsPathGateway2 { @SubscribeMessage('push') onPush(client, data) { return { event: 'pop', data, }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/server.gateway.ts
integration/websockets/src/server.gateway.ts
import { OnApplicationShutdown, UseInterceptors } from '@nestjs/common'; import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; import * as Sinon from 'sinon'; import { RequestInterceptor } from './request.interceptor'; @WebSocketGateway() export class ServerGateway implements OnApplicationShutdown {...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/request.interceptor.ts
integration/websockets/src/request.interceptor.ts
import { CallHandler, ExecutionContext, Injectable } from '@nestjs/common'; @Injectable() export class RequestInterceptor { intercept(context: ExecutionContext, next: CallHandler) { const client = context.switchToWs().getClient(); const pattern = context.switchToWs().getPattern(); client.pattern = patter...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/ack.gateway.ts
integration/websockets/src/ack.gateway.ts
import { Ack, MessageBody, SubscribeMessage, WebSocketGateway, } from '@nestjs/websockets'; @WebSocketGateway(8080) export class AckGateway { @SubscribeMessage('push') onPush() { return 'pong'; } @SubscribeMessage('manual-ack') async handleManualAck( @MessageBody() data: any, @Ack() ack:...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/namespace.gateway.ts
integration/websockets/src/namespace.gateway.ts
import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets'; @WebSocketGateway(8080, { namespace: 'test', }) export class NamespaceGateway { @SubscribeMessage('push') onPush(client, data) { return { event: 'pop', data, }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/request.filter.ts
integration/websockets/src/request.filter.ts
import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common'; import { WsException } from '@nestjs/websockets'; @Catch(WsException) export class RequestFilter implements ExceptionFilter { catch(exception: WsException, host: ArgumentsHost) { const wsCtx = host.switchToWs(); const pattern = wsCtx.get...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/core.gateway.ts
integration/websockets/src/core.gateway.ts
import { ConnectedSocket, MessageBody, SubscribeMessage, WebSocketGateway, } from '@nestjs/websockets'; @WebSocketGateway(8090) export class CoreGateway { @SubscribeMessage('push') onPush(@ConnectedSocket() client, @MessageBody() data) { return { event: 'pop', data, }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/app.gateway.ts
integration/websockets/src/app.gateway.ts
import { UseFilters, UseInterceptors } from '@nestjs/common'; import { MessageBody, SubscribeMessage, WebSocketGateway, WsException, } from '@nestjs/websockets'; import { RequestInterceptor } from './request.interceptor'; import { throwError } from 'rxjs'; import { RequestFilter } from './request.filter'; @Web...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/ws-path.gateway.ts
integration/websockets/src/ws-path.gateway.ts
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; @WebSocketGateway({ path: '/ws-path', }) export class WsPathGateway { @SubscribeMessage('push') onPush(client, data) { return { event: 'pop', data, }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/error.gateway.ts
integration/websockets/src/error.gateway.ts
import { SubscribeMessage, WebSocketGateway, WsException, } from '@nestjs/websockets'; import { throwError } from 'rxjs'; @WebSocketGateway(8080) export class ErrorGateway { @SubscribeMessage('push') onPush() { return throwError(() => new WsException('test')); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/src/example-path.gateway.ts
integration/websockets/src/example-path.gateway.ts
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; @WebSocketGateway({ path: '/example', }) export class ExamplePathGateway { @SubscribeMessage('push') onPush(client, data) { return { event: 'pop', data, }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/e2e/gateway-ack.spec.ts
integration/websockets/e2e/gateway-ack.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { io } from 'socket.io-client'; import { AckGateway } from '../src/ack.gateway'; async function createNestApp(...gateways): Promise<INestApplication> { const testingModule = await Test.cre...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/e2e/ws-gateway.spec.ts
integration/websockets/e2e/ws-gateway.spec.ts
import { INestApplication } from '@nestjs/common'; import { WsAdapter } from '@nestjs/platform-ws'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as WebSocket from 'ws'; import { ApplicationGateway } from '../src/app.gateway'; import { CoreGateway } from '../src/core.gateway'; import {...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/websockets/e2e/gateway.spec.ts
integration/websockets/e2e/gateway.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { EventSource } from 'eventsource'; import { io } from 'socket.io-client'; import { AppController as LongConnectionController } from '../../nest-application/sse/src/app.controller'; import { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false