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
@param transformer {Function(code, filePath)} a function called with the original code and the associated path of the file from where the code was loaded. Should return the transformed code.
However, what actually gets passed as the second argument to the transformer callback is an object that looks like this: { filename: '/the/file/path' }.
The
hookRequire
function in the hook.js file of istanbul-lib-hook does not behave as documented.The JSDoc for hookRequire has
This also matches its type definition:
However, what actually gets passed as the second argument to the
transformer
callback is an object that looks like this:{ filename: '/the/file/path' }
.The problematic lines of code are
The options to fix this would be either:
transformed = transformer(code, options.filename);
The text was updated successfully, but these errors were encountered: