You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This replaces`console` just inside`myModule`. That is, because rewire is using`eval()` to turn the key expression into an assignment. Hence, calling`myModule.__set__("console.log", fn)` modifies the`log` function on the*global*`console` object.
193
193
194
+
**Transpiled ES6 modules**<br>
195
+
If you are using Babel with ES6 rewire does not know how to mock the top level references in a module because Babel has remapped them (see#62).
196
+
197
+
In this case you should use[babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) instead.