UNPKG

node-redlock

Version:

A distributed locking algorithm used to manage distributed resources in a system.

14 lines (11 loc) 315 B
// RedisjsClientMock.ts import { RedisClient } from '../interfaces/RedisClient'; import { SinonStub, stub } from 'sinon'; export class RedisjsClientMock implements RedisClient { set: SinonStub; eval: SinonStub; constructor() { this.set = stub().resolves('OK'); this.eval = stub().resolves(1); } }