Open boneskull opened 5 years ago
The only incompatibility with esm
I am aware of, was bound to callThought
and default export
, as long as esm
expects __esModules
to be a property, not only a value, while other systems (babel/webpack) are not checking details.
It would be better rewrite one test to:
const c = rewiremock.proxy("./c.js", () => {
rewiremock(() => require('path')).with({
extname: () => "b"
});
rewiremock(() => require('./b.js')).with("c");
});
As long as it's much more complex "inside", mocking Module._load
twice - first to resolve name, and then to actually mock. 🙏
Are the tests supposed to pass? Or fail and show an issue I need to resolve?
Unfortunately the are passing.
rewiremock: https://npm.im/rewiremock