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
{{ message }}
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.
When trying to reRequire a file named index that is in the local path, reRequire will instead return what mock-require exports, specifically the startMocking function.
Based on looking at the code (and specifically at getFullPath and isInNodePath, it looks like any file that can be resolved from the mock-require package will cause it to return that file rather than the actual local file.
The text was updated successfully, but these errors were encountered:
When trying to
reRequire
a file namedindex
that is in the local path,reRequire
will instead return whatmock-require
exports, specifically thestartMocking
function.Example code:
index.js:
test.js:
Expected output:
Actual output:
Based on looking at the code (and specifically at
getFullPath
andisInNodePath
, it looks like any file that can be resolved from the mock-require package will cause it to return that file rather than the actual local file.The text was updated successfully, but these errors were encountered: