question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export interface changed (jest)

See original GitHub issue

Not sure what happened, but after upgrading to ioredis@4.27.10 jest cant fully mock ioredis module

ioredis@4.27.10

> jest.genMockFromModule('ioredis').Cluster
undefined

ioredis@4.27.9

> jest.genMockFromModule('ioredis').Cluster
ƒ Cluster() {return mockConstructor.apply(this,arguments);}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
luincommented, Oct 11, 2021

@artur-ma You are correct. Sorry for didn’t notice that. Created a fix! @liaoliaots Thanks for the solution here.

1reaction
artur-macommented, Oct 10, 2021

Hey, thanks, but the point that this is a breaking change, we have hundreds on tests that rely on these mocks 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Typescript Interface with Jest - Stack Overflow
I've taken a closer look at this issue and there are two ways to get the desired outcome: exclude files that contain only...
Read more >
Configuring Jest
The configuration file should simply export an object: ... to generate a cache key to determine if the logic has changed and any...
Read more >
Add React and Tests to a TypeScript project
React is a JavaScript library to build user interfaces. ... did before we have to change some configurations to include our jest packages....
Read more >
Testing Recipes - React
This page assumes you're using Jest as a test runner. ... “units” of interaction with a user interface. react-dom/test-utils provides a helper called...
Read more >
Continuous integration for React applications using Jest and ...
It provides an intuitive model for building data-driven user interfaces, and efficiently updates the DOM when this data changes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found