-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NDD-103] Member API E2E 테스트 (1h / 1h) (#29)
* test: Member API E2E 테스트 코드 작성 1. /api/member GET API 에 대한 성공 테스트 2. /api/member GET API에서 유효하지 않은 토큰 사용으로 인한 실패 테스트 위의 2가지의 경우에 대한 테스트 코드 작성 * style: lint 적용 * test: 인수 테스트 코드 로직 변경 완료 GET /api/member에 대한 E2E 테스트 완료 * style: Window 개행문자 관련 에러 해결을 위한 lint 설정 추가 * feat: TestingModule을 생성하는 Util 메서드 구현
- Loading branch information
1 parent
7c05a3b
commit bf4c6c5
Showing
5 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import {CorsOptions} from "@nestjs/common/interfaces/external/cors-options.interface"; | ||
import {CORS_HEADERS, CORS_ORIGIN} from "./cors.secure"; | ||
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface'; | ||
import { CORS_HEADERS, CORS_ORIGIN } from './cors.secure'; | ||
|
||
export const CORS_CONFIG: CorsOptions = { | ||
origin: CORS_ORIGIN, | ||
credentials: true, | ||
exposedHeaders: CORS_HEADERS, | ||
} | ||
origin: CORS_ORIGIN, | ||
credentials: true, | ||
exposedHeaders: CORS_HEADERS, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ModuleMetadata } from '@nestjs/common'; | ||
import { Test, TestingModule } from '@nestjs/testing'; | ||
|
||
export const createTestModuleFixture = async ( | ||
imports: unknown, | ||
controllers: unknown, | ||
providers: unknown, | ||
) => { | ||
const moduleFixture: TestingModule = await Test.createTestingModule({ | ||
imports: imports, | ||
controllers: controllers, | ||
providers: providers, | ||
} as ModuleMetadata).compile(); | ||
|
||
return moduleFixture; | ||
}; |