stipsan / ioredis-mock

Emulates ioredis by performing all operations in-memory.
MIT License
333 stars 125 forks source link

spy on ioredis #1337

Open idaamit opened 9 months ago

idaamit commented 9 months ago

I'm using ioredis-mock in my ts code with jest. import RedisMock from 'ioredis-mock';

RedisMock.prototype.status = 'ready'
jest.mock('ioredis', () => jest.requireActual('ioredis-mock'));

I need to know how many times the get / set method was called and what were the passed parameters. How can I do it?