Skip to content
New issue

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

fix module cache breaking for modules not being mocked #72

Closed
wants to merge 1 commit into from

Conversation

connorjclark
Copy link
Contributor

This resolves testdouble/testdouble.js#492 without breaking any existing tests.

Confirmed this work great in our usage of testdouble in Lighthouse tests


return [...global.__quibble.quibbledModules.entries()].find(([m]) => m === moduleFilepath)
const stub = global.__quibble.quibbledModules.get(moduleFilepath)
return stub ? [moduleFilepath, stub] : undefined
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by performance improvement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always appreciated. this lib doesn't get a lot of love

@searls
Copy link
Member

searls commented Jul 14, 2022

Hand-merged this one after confirming locally b/c CI was disconnected. Thanks!

Landed in 0.6.10

@searls
Copy link
Member

searls commented Jul 15, 2022

This was reverted in 0.6.11. See discussion in testdouble/testdouble.js#493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

es module cache is broken by testdouble loader / quibble
2 participants