Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitiwat-owen committed Oct 29, 2023
1 parent 201e0a7 commit 857d6c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/user/user.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Test, TestingModule } from '@nestjs/testing';
import { UserService } from './user.service';
import { UserRepository } from '../repository/user.repository';
import { SportAreaListRepository } from '../repository/sportAreaList.repository';

describe('UserService', () => {
let service: UserService;
Expand All @@ -10,6 +11,8 @@ describe('UserService', () => {
exclude: jest.fn(),
};

const mockSportAreaListRepo = {};

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
Expand All @@ -18,6 +21,10 @@ describe('UserService', () => {
provide: UserRepository,
useValue: mockUserRepository,
},
{
provide: SportAreaListRepository,
useValue: mockSportAreaListRepo,
},
],
}).compile();

Expand Down

0 comments on commit 857d6c9

Please sign in to comment.