bahmutov / bahmutov/cache-require-paths
Does not play nice with mockery
Open
bug
- Dominant language
- JavaScript
- Stars
- 126
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
In my test code I'm registering a substitute module for `electron`.
When I enable `cache-require-paths` it will never use the substituted module, and instead error:
`Error: Cannot find module 'electron'`
``` js
require("cache-require-paths")
var mockery = require("mockery")
mockery.enable()
mockery.registerSubstitute("electron", "./electron_stub")
require("electron") // <-- bomb
```
This will work if I remove `cache-require-paths`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.