File tree Expand file tree Collapse file tree 5 files changed +18
-18
lines changed
Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 11import { ExecutionContext , INestApplication } from "@nestjs/common" ;
2- import { Test , TestingModule } from "@nestjs/testing" ;
2+ import { Test } from "@nestjs/testing" ;
33import { Request } from "express" ;
44import * as request from "supertest" ;
55
@@ -13,7 +13,7 @@ describe("AuthController (e2e)", () => {
1313 const AUTH_URL = "/api/auth" ;
1414
1515 beforeEach ( async ( ) => {
16- const moduleFixture : TestingModule = await Test . createTestingModule ( {
16+ const moduleRef = await Test . createTestingModule ( {
1717 imports : [ AuthModule ]
1818 } )
1919 . overrideGuard ( JwtAuthGuard )
@@ -26,7 +26,7 @@ describe("AuthController (e2e)", () => {
2626 } )
2727 . compile ( ) ;
2828
29- app = moduleFixture . createNestApplication ( ) ;
29+ app = moduleRef . createNestApplication ( ) ;
3030 app . setGlobalPrefix ( "api" ) ;
3131
3232 await app . init ( ) ;
Original file line number Diff line number Diff line change 11import { ExecutionContext , INestApplication , ValidationPipe } from "@nestjs/common" ;
2- import { Test , TestingModule } from "@nestjs/testing" ;
2+ import { Test } from "@nestjs/testing" ;
33import { BookingStatus } from "@prisma/client" ;
44import { Request } from "express" ;
55import * as request from "supertest" ;
@@ -18,7 +18,7 @@ describe("BookingController (e2e)", () => {
1818 const BOOKING_URL = "/api/booking" ;
1919
2020 beforeAll ( async ( ) => {
21- const moduleFixture : TestingModule = await Test . createTestingModule ( {
21+ const moduleRef = await Test . createTestingModule ( {
2222 imports : [ AppModule ]
2323 } )
2424 . overrideGuard ( JwtAuthGuard )
@@ -31,8 +31,8 @@ describe("BookingController (e2e)", () => {
3131 } )
3232 . compile ( ) ;
3333
34- app = moduleFixture . createNestApplication ( ) ;
35- prismaService = moduleFixture . get < PrismaService > ( PrismaService ) ;
34+ app = moduleRef . createNestApplication ( ) ;
35+ prismaService = moduleRef . get < PrismaService > ( PrismaService ) ;
3636
3737 app . useGlobalPipes ( new ValidationPipe ( { transform : true , whitelist : true } ) ) ;
3838 app . setGlobalPrefix ( "api" ) ;
Original file line number Diff line number Diff line change 11import { ExecutionContext , INestApplication , ValidationPipe } from "@nestjs/common" ;
2- import { Test , TestingModule } from "@nestjs/testing" ;
2+ import { Test } from "@nestjs/testing" ;
33import { Request } from "express" ;
44import * as request from "supertest" ;
55
@@ -15,7 +15,7 @@ describe("LocationController (e2e)", () => {
1515 const LOCATION_URL = "/api/location" ;
1616
1717 beforeAll ( async ( ) => {
18- const moduleFixture : TestingModule = await Test . createTestingModule ( {
18+ const moduleRef = await Test . createTestingModule ( {
1919 imports : [ AppModule ]
2020 } )
2121 . overrideGuard ( JwtAuthGuard )
@@ -28,7 +28,7 @@ describe("LocationController (e2e)", () => {
2828 } )
2929 . compile ( ) ;
3030
31- app = moduleFixture . createNestApplication ( ) ;
31+ app = moduleRef . createNestApplication ( ) ;
3232
3333 app . useGlobalPipes ( new ValidationPipe ( { transform : true , whitelist : true } ) ) ;
3434 app . setGlobalPrefix ( "api" ) ;
Original file line number Diff line number Diff line change 11import { ExecutionContext , INestApplication , ValidationPipe } from "@nestjs/common" ;
2- import { Test , TestingModule } from "@nestjs/testing" ;
2+ import { Test } from "@nestjs/testing" ;
33import { Request } from "express" ;
44import * as request from "supertest" ;
55
@@ -17,7 +17,7 @@ describe("ServiceController (e2e)", () => {
1717 const SERVICE_URL = "/api/service" ;
1818
1919 beforeAll ( async ( ) => {
20- const moduleFixture : TestingModule = await Test . createTestingModule ( {
20+ const moduleRef = await Test . createTestingModule ( {
2121 imports : [ AppModule ]
2222 } )
2323 . overrideGuard ( JwtAuthGuard )
@@ -30,8 +30,8 @@ describe("ServiceController (e2e)", () => {
3030 } )
3131 . compile ( ) ;
3232
33- app = moduleFixture . createNestApplication ( ) ;
34- prismaService = moduleFixture . get < PrismaService > ( PrismaService ) ;
33+ app = moduleRef . createNestApplication ( ) ;
34+ prismaService = moduleRef . get < PrismaService > ( PrismaService ) ;
3535
3636 app . useGlobalPipes ( new ValidationPipe ( { transform : true , whitelist : true } ) ) ;
3737 app . setGlobalPrefix ( "api" ) ;
Original file line number Diff line number Diff line change 11import { ExecutionContext , INestApplication , ValidationPipe } from "@nestjs/common" ;
2- import { Test , TestingModule } from "@nestjs/testing" ;
2+ import { Test } from "@nestjs/testing" ;
33import { Request } from "express" ;
44import * as request from "supertest" ;
55
@@ -16,7 +16,7 @@ describe("UserController (e2e)", () => {
1616 const USER_URL = "/api/user" ;
1717
1818 beforeAll ( async ( ) => {
19- const moduleFixture : TestingModule = await Test . createTestingModule ( {
19+ const moduleRef = await Test . createTestingModule ( {
2020 imports : [ AppModule ]
2121 } )
2222 . overrideGuard ( JwtAuthGuard )
@@ -29,8 +29,8 @@ describe("UserController (e2e)", () => {
2929 } )
3030 . compile ( ) ;
3131
32- app = moduleFixture . createNestApplication ( ) ;
33- prismaService = moduleFixture . get < PrismaService > ( PrismaService ) ;
32+ app = moduleRef . createNestApplication ( ) ;
33+ prismaService = moduleRef . get < PrismaService > ( PrismaService ) ;
3434
3535 app . useGlobalPipes ( new ValidationPipe ( { transform : true , whitelist : true } ) ) ;
3636 app . setGlobalPrefix ( "api" ) ;
You can’t perform that action at this time.
0 commit comments