Compare commits

..

1 Commits

Author SHA1 Message Date
Ivan
6f6018501b chore: 更新 auth 依赖。 2021-07-22 10:51:57 +08:00
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import { CommonsModule } from './../commons/commons.module';
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ArticlesService } from './articles.service'; import { ArticlesService } from './articles.service';
import { ArticlesResolver } from './articles.resolver'; import { ArticlesResolver } from './articles.resolver';
@ -5,7 +6,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';
import { Article } from './entities/article.entity'; import { Article } from './entities/article.entity';
@Module({ @Module({
imports: [TypeOrmModule.forFeature([Article])], imports: [TypeOrmModule.forFeature([Article]), CommonsModule],
providers: [ArticlesResolver, ArticlesService], providers: [ArticlesResolver, ArticlesService],
}) })
export class ArticlesModule {} export class ArticlesModule {}

View File

@ -1,3 +1,4 @@
import { JwtService } from '@nestjs-lib/auth';
import { Test, TestingModule } from '@nestjs/testing'; import { Test, TestingModule } from '@nestjs/testing';
import { ArticlesResolver } from './articles.resolver'; import { ArticlesResolver } from './articles.resolver';
import { ArticlesService } from './articles.service'; import { ArticlesService } from './articles.service';
@ -13,6 +14,10 @@ describe('ArticlesResolver', () => {
provide: ArticlesService, provide: ArticlesService,
useValue: {}, useValue: {},
}, },
{
provide: JwtService,
useValue: {},
},
], ],
}).compile(); }).compile();

View File

@ -6,6 +6,6 @@ import { AuthModule } from '@nestjs-lib/auth';
@Module({ @Module({
imports: [PubSubModule, AuthModule], imports: [PubSubModule, AuthModule],
providers: [PasswordConverter], providers: [PasswordConverter],
exports: [PasswordConverter], exports: [PasswordConverter, AuthModule],
}) })
export class CommonsModule {} export class CommonsModule {}