增加post服务
This commit is contained in:
parent
1f12ad7557
commit
8bbd894976
|
@ -1,7 +1,9 @@
|
||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { PostController } from './post.controller';
|
import { PostController } from './post.controller';
|
||||||
|
import { PostService } from './post.service';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [PostController]
|
controllers: [PostController],
|
||||||
|
providers: [PostService]
|
||||||
})
|
})
|
||||||
export class PostModule {}
|
export class PostModule {}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
|
import { PostService } from './post.service';
|
||||||
|
|
||||||
|
describe('PostService', () => {
|
||||||
|
let service: PostService;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
|
providers: [PostService],
|
||||||
|
}).compile();
|
||||||
|
|
||||||
|
service = module.get<PostService>(PostService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be defined', () => {
|
||||||
|
expect(service).toBeDefined();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,4 @@
|
||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class PostService {}
|
Loading…
Reference in New Issue