-
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.
- 업로드 모듈에서 테스트 모듈 의존성 추가 - 토익 문제 모듈에서 테스트 모듈 의존성 추가 Related to #18
- Loading branch information
Showing
4 changed files
with
15 additions
and
12 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
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,27 +1,27 @@ | ||
import { Test, TestingModule } from '@nestjs/testing'; | ||
import { ToeicService } from './toeic.service'; | ||
import { SupabaseService } from '../supabase/supabase.service'; | ||
import { PrismaService } from '../prisma/prisma.service'; | ||
|
||
class MockSupabaseService {} | ||
class MockPrisma {} | ||
|
||
describe('ToeicService', () => { | ||
let service: ToeicService; | ||
let supabaseService: SupabaseService; | ||
let prisma: PrismaService; | ||
|
||
beforeEach(async () => { | ||
const module: TestingModule = await Test.createTestingModule({ | ||
providers: [ | ||
ToeicService, | ||
{ provide: SupabaseService, useClass: MockSupabaseService }, | ||
{ provide: PrismaService, useClass: MockPrisma }, | ||
], | ||
}).compile(); | ||
|
||
service = module.get<ToeicService>(ToeicService); | ||
supabaseService = module.get<SupabaseService>(SupabaseService); | ||
prisma = module.get<PrismaService>(PrismaService); | ||
}); | ||
|
||
it('should be defined', () => { | ||
expect(service).toBeDefined(); | ||
expect(supabaseService).toBeDefined(); | ||
expect(prisma).toBeDefined(); | ||
}); | ||
}); |
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