diff --git a/src/app.controller.ts b/src/app.controller.ts index cce879e..132ead6 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -10,3 +10,5 @@ export class AppController { return this.appService.getHello(); } } + + \ No newline at end of file diff --git a/src/app.module.ts b/src/app.module.ts index ab131fc..b464849 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -3,9 +3,10 @@ import { AppController } from './app.controller'; import { AppService } from './app.service'; import { PostsModule } from './posts/posts.module'; import { UserModule } from './user/user.module'; +import { CommentsModule } from './comments/comments.module'; @Module({ - imports: [PostsModule, UserModule], + imports: [PostsModule, UserModule, CommentsModule], controllers: [AppController], providers: [AppService], }) diff --git a/src/comments/comments.controller.spec.ts b/src/comments/comments.controller.spec.ts new file mode 100644 index 0000000..3aa5596 --- /dev/null +++ b/src/comments/comments.controller.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentsController } from './comments.controller'; + +describe('CommentsController', () => { + let controller: CommentsController; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [CommentsController], + }).compile(); + + controller = module.get(CommentsController); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/src/comments/comments.controller.ts b/src/comments/comments.controller.ts new file mode 100644 index 0000000..94e47d0 --- /dev/null +++ b/src/comments/comments.controller.ts @@ -0,0 +1,4 @@ +import { Controller } from '@nestjs/common'; + +@Controller('comments') +export class CommentsController {} diff --git a/src/comments/comments.module.ts b/src/comments/comments.module.ts new file mode 100644 index 0000000..18d428e --- /dev/null +++ b/src/comments/comments.module.ts @@ -0,0 +1,9 @@ +import { Module } from '@nestjs/common'; +import { CommentsController } from './comments.controller'; +import { CommentsService } from './comments.service'; + +@Module({ + controllers: [CommentsController], + providers: [CommentsService] +}) +export class CommentsModule {} diff --git a/src/comments/comments.service.spec.ts b/src/comments/comments.service.spec.ts new file mode 100644 index 0000000..8ab6e50 --- /dev/null +++ b/src/comments/comments.service.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentsService } from './comments.service'; + +describe('CommentsService', () => { + let service: CommentsService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [CommentsService], + }).compile(); + + service = module.get(CommentsService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/src/comments/comments.service.ts b/src/comments/comments.service.ts new file mode 100644 index 0000000..459b71b --- /dev/null +++ b/src/comments/comments.service.ts @@ -0,0 +1,4 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class CommentsService {}