skip to Main Content

how to mock node-redis using jest

i am using jest and trying to mock node-redis using redis-mock. // redis.js const redis = require("redis"); const client = redis.createClient({ host: '127.0.0.1', port: 6379 }); // redis.test.js const redisMock = require("redis-mock"); describe("redis", () => { jest.doMock("redis", () => jest.fn(()…

VIEW QUESTION
Back To Top
Search