Skip to content

Commit 8ff71e6

Browse files
committed
Move spec file next to source — colocated test convention
1 parent 47a06e4 commit 8ff71e6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Test, TestingModule } from "@nestjs/testing";
2+
import { AppController } from "./app.controller";
3+
4+
describe("AppController", () => {
5+
let controller: AppController;
6+
7+
beforeEach(async () => {
8+
const module: TestingModule = await Test.createTestingModule({
9+
controllers: [AppController],
10+
}).compile();
11+
12+
controller = module.get<AppController>(AppController);
13+
});
14+
15+
describe("getHealth", () => {
16+
it("should return status ok", () => {
17+
expect(controller.getHealth()).toEqual({ status: "ok" });
18+
});
19+
});
20+
});

0 commit comments

Comments
 (0)