We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to remove the cache for mocha test. When I run the below code I get the error
(node:1550) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
const glob = require('glob-promise'); const clearModule = require('clear-module'); const specs = await glob('./testfiles/*.js', { absolute: true }); console.log(specs); specs.map(spec => { clearModule(spec); mocha.addFile(spec); });
I checked more to find the error and found out that when I use following code
console.log(callerPath());
I get null. So it seems callerPath can't get the folder. I tested above code with NodeJS v10.4.1
callerPath
The text was updated successfully, but these errors were encountered:
Ditto, I have the same issue with Node 10.
Sorry, something went wrong.
https://github.com/sindresorhus/clear-module/releases/tag/v3.1.0 should fix this. Let me know if it does not.
No branches or pull requests
I am trying to remove the cache for mocha test. When I run the below code I get the error
I checked more to find the error and found out that when I use following code
I get null. So it seems
callerPath
can't get the folder. I tested above code with NodeJS v10.4.1The text was updated successfully, but these errors were encountered: