Showing
22 changed files
with
163 additions
and
1 deletions
... | @@ -6,6 +6,10 @@ import { AppController } from './app.controller'; | ... | @@ -6,6 +6,10 @@ import { AppController } from './app.controller'; |
6 | import { AppService } from './app.service'; | 6 | import { AppService } from './app.service'; |
7 | import { MypageModule } from './mypage/mypage.module'; | 7 | import { MypageModule } from './mypage/mypage.module'; |
8 | import { PostModule } from './post/post.module'; | 8 | import { PostModule } from './post/post.module'; |
9 | +import { CommentModule } from './comment/comment.module'; | ||
10 | +import { UserModule } from './user/user.module'; | ||
11 | +import { LikeableService } from './likeable/likeable.service'; | ||
12 | +import { LikeableModule } from './likeable/likeable.module'; | ||
9 | 13 | ||
10 | @Module({ | 14 | @Module({ |
11 | imports: [ | 15 | imports: [ |
... | @@ -22,8 +26,11 @@ import { PostModule } from './post/post.module'; | ... | @@ -22,8 +26,11 @@ import { PostModule } from './post/post.module'; |
22 | }), | 26 | }), |
23 | MypageModule, | 27 | MypageModule, |
24 | PostModule, | 28 | PostModule, |
29 | + CommentModule, | ||
30 | + UserModule, | ||
31 | + LikeableModule, | ||
25 | ], | 32 | ], |
26 | controllers: [AppController], | 33 | controllers: [AppController], |
27 | - providers: [AppService], | 34 | + providers: [AppService, LikeableService], |
28 | }) | 35 | }) |
29 | export class AppModule {} | 36 | export class AppModule {} | ... | ... |
File mode changed
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { CommentResolver } from './comment.resolver'; | ||
3 | + | ||
4 | +describe('CommentResolver', () => { | ||
5 | + let resolver: CommentResolver; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [CommentResolver], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + resolver = module.get<CommentResolver>(CommentResolver); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(resolver).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { CommentService } from './comment.service'; | ||
3 | + | ||
4 | +describe('CommentService', () => { | ||
5 | + let service: CommentService; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [CommentService], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + service = module.get<CommentService>(CommentService); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(service).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
File mode changed
File mode changed
File mode changed
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { LikeableResolver } from './likeable.resolver'; | ||
3 | + | ||
4 | +describe('LikeableResolver', () => { | ||
5 | + let resolver: LikeableResolver; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [LikeableResolver], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + resolver = module.get<LikeableResolver>(LikeableResolver); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(resolver).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { LikeableService } from './likeable.service'; | ||
3 | + | ||
4 | +describe('LikeableService', () => { | ||
5 | + let service: LikeableService; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [LikeableService], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + service = module.get<LikeableService>(LikeableService); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(service).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
File mode changed
project/packages/api/src/user/user.entity.ts
0 → 100644
File mode changed
project/packages/api/src/user/user.module.ts
0 → 100644
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { UserResolver } from './user.resolver'; | ||
3 | + | ||
4 | +describe('UserResolver', () => { | ||
5 | + let resolver: UserResolver; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [UserResolver], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + resolver = module.get<UserResolver>(UserResolver); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(resolver).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
2 | +import { UserService } from './user.service'; | ||
3 | + | ||
4 | +describe('UserService', () => { | ||
5 | + let service: UserService; | ||
6 | + | ||
7 | + beforeEach(async () => { | ||
8 | + const module: TestingModule = await Test.createTestingModule({ | ||
9 | + providers: [UserService], | ||
10 | + }).compile(); | ||
11 | + | ||
12 | + service = module.get<UserService>(UserService); | ||
13 | + }); | ||
14 | + | ||
15 | + it('should be defined', () => { | ||
16 | + expect(service).toBeDefined(); | ||
17 | + }); | ||
18 | +}); |
-
Please register or login to post a comment