test: 完善测试用例
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { RedisService } from 'nestjs-redis';
|
||||
import { RedisMutexService } from './redis-mutex.service';
|
||||
|
||||
describe('RedisMutexService', () => {
|
||||
@ -6,7 +7,13 @@ describe('RedisMutexService', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [RedisMutexService],
|
||||
providers: [
|
||||
RedisMutexService,
|
||||
{
|
||||
provide: RedisService,
|
||||
useValue: {},
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
service = module.get<RedisMutexService>(RedisMutexService);
|
||||
|
Reference in New Issue
Block a user