speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

__set__ doesn't return revert function with objects #146

Closed patapizza closed 7 years ago

patapizza commented 7 years ago

When calling set with an object, the returned value is not a function.

Expected: https://github.com/jhnns/rewire#rewiredmodule__set__obj-object-function Got: TypeError: revert is not a function

speedskater commented 7 years ago

@patapizza Thanks for pointing this out. We will have a look at it. Think I will do a new rc on the upcoming monday.

speedskater commented 7 years ago

@patapizza Sorry again for this delay, but I was tackling a serious issue with jsx support. I hope I can come back to your issue ASAP.

speedskater commented 7 years ago

@patapizza I just implemented the revert function feature, as used by rewire.js. It will be in the upcoming rc-7 which will be released today.

patapizza commented 7 years ago

Cool, thanks!