MCPcopy
hub / github.com/nestjs/nest / createNestApp

Function createNestApp

integration/websockets/e2e/ws-gateway.spec.ts:13–20  ·  view source on GitHub ↗
(...gateways: any[])

Source from the content-addressed store, hash-verified

11import { WsPathGateway2 } from '../src/ws-path2.gateway';
12
13async function createNestApp(...gateways: any[]): Promise<INestApplication> {
14 const testingModule = await Test.createTestingModule({
15 providers: gateways,
16 }).compile();
17 const app = testingModule.createNestApplication();
18 app.useWebSocketAdapter(new WsAdapter(app) as any);
19 return app;
20}
21
22describe('WebSocketGateway (WsAdapter)', () => {
23 let ws: WebSocket, ws2: WebSocket, app: INestApplication;

Callers 1

ws-gateway.spec.tsFile · 0.70

Calls 4

createTestingModuleMethod · 0.80
createNestApplicationMethod · 0.80
useWebSocketAdapterMethod · 0.65
compileMethod · 0.45

Tested by

no test coverage detected