-
Notifications
You must be signed in to change notification settings - Fork 26
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
Verify quibble works with esm #13
Comments
One problem is that esm exports live bindings through getters. That seems to prevent proper fakes from being returned. |
Could you please create a minimal project that reproduces the issue?
… On May 21, 2018, at 6:29 AM, Mark Wubben ***@***.***> wrote:
One problem is that esm exports live bindings through getters. That seems to prevent proper fakes from being returned.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
👋 I've been playing with the combination of esm and testdouble.js on a small project recently, ran into some issues with that combination and wanted to share my findings here. The bad news is that quibble does not Just Work™ out of the box with esm enabled. The good news is that I think I've found a fairly simple workaround. Here is an example repository where I've reproduced the issue. TL;DR add this before your test suite runs to get esm + quibble working together. require('quibble').ignoreCallsFromThisFile(require.resolve('esm/esm')) I can submit a PR to update the README with a note about esm support so it's easily discoverable. I would also be interested in adding esm support based on this approach as a baked in feature for quibble. cc @jasonkarns |
Fixed by #29 |
So, @jdalton released esm today and it looks super cool!
@Schoonology just raised the point that we should validate that quibble works with esm and figure out why not if it doesn't. There's a chance things will "just work" since we're monkey patching Module._load, but we should test it out!
The text was updated successfully, but these errors were encountered: