We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The node-redis RedisClient module has a connect method that initates the connection. The same is missing in the mock class.
The text was updated successfully, but these errors were encountered:
Eg. for a jest extension:
// Extend redis-mock to include isOpen, connect, and disconnect jest.mock('redis', () => { const redisMock = jest.requireActual('redis-mock'); const enhancedRedisMock = { ...redisMock, createClient: () => { const client = redisMock.createClient(); client.isOpen = true; client.connect = jest.fn().mockResolvedValue(null); client.disconnect = jest.fn().mockResolvedValue(null); return client; }, }; return enhancedRedisMock; });
Sorry, something went wrong.
No branches or pull requests
The node-redis RedisClient module has a connect method that initates the connection. The same is missing in the mock class.
The text was updated successfully, but these errors were encountered: