-
Notifications
You must be signed in to change notification settings - Fork 15
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
Mocha version #65
Comments
I think it should work out of the box. You can just put jest_workaround in the .swcrc configuration file. I don't know the details about whether it can only work for mocha like jest. For the issue you linked, there is another unsolvable issue: |
@magic-akari Thanks for that! I think the plugin should be renamed to something that has nothing to do with Jest. It really should be something like "plugin-swc-mutable-exports" (or whatever the naming convention for swc is). I got it running though! https://github.com/fatso83/sinon-swc-bug/tree/swc-with-mutable-exports The issue you talk about is that the exports are getters. Since these getters are actually writable/configurable, I just instructed Sinon to replace the getter. |
This module solves a problem that is recurring in many situations (and which also occurs in other bundlers). The essential changes seem to have nothing to do with Jest specifically, so would it be possible to modify the API to make it possible to using it with other test runners, like Ava or Mocha?
Typically, seeing something like this in
.mocharc.json
:The text was updated successfully, but these errors were encountered: