Skip to content

Commit

Permalink
test: 테스트 코드 환경변수 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
minjungw00 committed Nov 20, 2024
1 parent 7d1a3ab commit 6c3bfc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/app.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ describe("AppModule", () => {
if (!process.env.JWT_SECRET) {
process.env.JWT_SECRET = "test-secret";
}
if (!process.env.JWT_REFRESH_SECRET) {
process.env.JWT_REFRESH_SECRET = "test-secret";
}

testingModule = await Test.createTestingModule({
imports: [MongooseModule.forRoot(process.env.MONGO_URI), AppModule],
Expand Down
3 changes: 3 additions & 0 deletions server/src/auth/test/auth.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ describe("AuthModule", () => {
if (!process.env.JWT_SECRET) {
process.env.JWT_SECRET = "test-secret";
}
if (!process.env.JWT_REFRESH_SECRET) {
process.env.JWT_REFRESH_SECRET = "test-secret";
}

testingModule = await Test.createTestingModule({
imports: [
Expand Down

0 comments on commit 6c3bfc1

Please sign in to comment.