Files
oxc-project__oxc/tasks/e2e/nestjs/src/app.controller.spec.ts
Boshen 1d680de87e chore(pnpm): remove tasks/e2e workspace (#16881)
I thought making it a separate would be easier to manage,
but it's actually not.

Previous setup was also downloading packages from npm on every CI run.
2025-12-16 14:03:25 +00:00

23 lines
639 B
TypeScript

import { expect, beforeAll, describe, it } from "vitest";
import { Test, TestingModule } from "@nestjs/testing";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
describe("AppController", () => {
let app: TestingModule;
beforeAll(async () => {
app = await Test.createTestingModule({
controllers: [AppController],
providers: [AppService],
}).compile();
});
describe("getHello", () => {
it('should return "Hello World!"', () => {
const appController = app.get(AppController);
expect(appController.getHello()).toBe("Hello World!");
});
});
});