fix: test disable redis subpub

This commit is contained in:
Innei
2022-01-18 19:43:46 +08:00
parent 9b8c4ce048
commit 72006a170f
3 changed files with 17 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import { registerGlobal } from 'test/register-global'
import { AuthService } from '~/modules/auth/auth.service'
import { UserController } from '~/modules/user/user.controller'
import { UserService } from '~/modules/user/user.service'
import { CacheService } from '~/processors/cache/cache.service'
registerGlobal()
describe('test UserModule controller', () => {
let userController: UserController
@@ -10,7 +11,11 @@ describe('test UserModule controller', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [UserController],
providers: [UserService, AuthService],
providers: [
UserService,
AuthService,
{ provide: CacheService, useValue: {} },
],
})
.overrideProvider(UserService)
.useValue({