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

Function createApp

integration/hello-world/e2e/middleware.spec.ts:106–121  ·  view source on GitHub ↗
(
  beforeInit?: (app: INestApplication) => void,
)

Source from the content-addressed store, hash-verified

104});
105
106async function createApp(
107 beforeInit?: (app: INestApplication) => void,
108): Promise<INestApplication> {
109 const app = (
110 await Test.createTestingModule({
111 imports: [TestModule],
112 }).compile()
113 ).createNestApplication();
114
115 if (beforeInit) {
116 beforeInit(app);
117 }
118 await app.init();
119
120 return app;
121}

Callers 1

middleware.spec.tsFile · 0.85

Calls 4

createNestApplicationMethod · 0.80
createTestingModuleMethod · 0.80
initMethod · 0.65
compileMethod · 0.45

Tested by

no test coverage detected