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
Calling td.replace with an incorrect module path prints out the following error:
TypeError: Cannot read property 'join' of undefined
at requireAt (node_modules/testdouble/lib/replace/module.js:34:32)
at default_1 (node_modules/testdouble/lib/replace/module.js:15:21)
at default_1 (node_modules/testdouble/lib/replace/index.js:10:33)
at Context.beforeEach (app/users/reset-password.test.js:22:12)
It should print something more informative, like the error message from require:
Absolutely agree. Can you give a specific example of what the correct name was and what was wrong? I ask because there are several different failure paths for module replacement and I want to be clear I understand your case
In my case the failure was caused by replace('./hash'), while the correct path was '../auth/hash'.
This was inside the test file <project root>/app/users/reset-password.test.js
Calling
td.replace
with an incorrect module path prints out the following error:It should print something more informative, like the error message from
require
:Error: Cannot find module '/incorrect/path/to/module'
Environment
node v8.10.0
testdouble@3.5.2
The text was updated successfully, but these errors were encountered: