Closed airhorns closed 3 years ago
Ended up needing a require cache too so i put together https://github.com/gadget-inc/requirefire which is a half fork of rewire
that does this other stuff. I think it is different enough that it belongs somewhere else but happy to try to port the changes to rewire if you think they should be here!
Follow up to #73
This adds support for rewire-ing the inner modules required by a rewire'd module. This is really useful if you have transitive dependencies you also want to mock, or if you are using rewire as a userland require implementation, to have rewire use it's own userland implementation for nested requires as opposed to just the outer one.