Compare commits
1 Commits
20970d7a1e
...
6f6018501b
Author | SHA1 | Date | |
---|---|---|---|
|
6f6018501b |
@ -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 {}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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 {}
|
||||||
|
Loading…
Reference in New Issue
Block a user