-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Export interface changed (jest) #1442
Comments
4.27.10 doesn't seem to introduce any changes that can affect this: v4.27.9...v4.27.10 |
@luin yeah, I saw the diff, I dont know what is the reason |
I think its related to the version of typescript u used for version x.10 this is x.10 index.js
this is x.9
|
same issue ✿◡‿◡ |
@artur-ma But we can mock manually via: // __mocks__/ioredis.ts
import { Cluster, Redis } from 'ioredis';
const mockIORedis = jest.createMockFromModule<{ default: Redis }>('ioredis/built/redis').default;
Reflect.defineProperty(mockIORedis, 'Cluster', {
enumerable: true,
value: jest.createMockFromModule<{ default: Cluster }>('ioredis/built/cluster').default
});
export default mockIORedis; |
Hey, thanks, but the point that this is a breaking change, we have hundreds on tests that rely on these mocks :( |
@artur-ma You are correct. Sorry for didn't notice that. Created a fix! |
🎉 This issue has been resolved in version 4.27.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Not sure what happened, but after upgrading to ioredis@4.27.10
jest cant fully mock ioredis module
ioredis@4.27.10
ioredis@4.27.9
The text was updated successfully, but these errors were encountered: