dryvPacks

@dryv/nestjs-appv0.3.0

NestJS application shell with bootstrap, package and tooling around the generated AppModule.

NestJS ApplicationBackendUnitPublished 25 days ago2 downloads

dryv pack add @dryv/nestjs-app

You are viewing version 0.3.0. The latest release is 0.3.1.

563 BRaw ↗
jinja
import { Test } from "@nestjs/testing";
import type { INestApplication } from "@nestjs/common";

import { AppModule } from "../src/app.module.ts";

describe("AppModule", () => {
  let app: INestApplication;

  beforeAll(async () => {
    const moduleRef = await Test.createTestingModule({ imports: [AppModule] }).compile();
    app = moduleRef.createNestApplication();
    await app.init();
  });

  afterAll(async () => {
    await app.close();
  });

  it("boots the generated Nest application", () => {
    expect(app.getHttpServer()).toBeDefined();
  });
});