Skip to content

Commit

Permalink
Update app.controller.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nayr974 committed Jan 7, 2025
1 parent a0d0d2a commit e18b27e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions backend/src/app.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { Test, TestingModule } from "@nestjs/testing";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { JwtAuthGuard } from "./auth/jwtauth.guard";
import { JwtRoleGuard } from "./auth/jwtrole.guard";
import { ROUTE_ARGS_METADATA } from "@nestjs/common/constants";
import { DataSource } from "typeorm";
import { dataSourceMockFactory } from "../../../test/mocks/datasource";

describe("AppController", () => {
let appController: AppController;

beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({
controllers: [AppController],
providers: [AppService],
providers: [
AppService,
{
provide: DataSource,
useFactory: dataSourceMockFactory,
},
],
}).compile();

appController = app.get<AppController>(AppController);
Expand Down

0 comments on commit e18b27e

Please sign in to comment.