Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
retVal();
hookCreateScript(matcher, transformer, {});
hookCreateScript(matcher, transformer, { verbose: true });
unhookCreateScript();
hookRunInThisContext(matcher, transformer, {});
hookRunInThisContext(matcher, transformer, { verbose: true });
unhookRunInThisContext();
unloadRequireCache(matcher);
hookRunInContext(matcher, transformer, {});
hookRunInContext(matcher, transformer, { verbose: true, coverageVariable: '__cov__' });
unhookRunInContext();
const hookFn = function(matchFn) {
const hookOpts = {
verbose: config.verbose,
extensions: config.instrumentation.extensions(),
coverageVariable: coverageVar
};
//initialize the global variable
coverageSetterFn({});
reportInitFn();
if (config.hooks.hookRunInContext()) {
hook.hookRunInContext(matchFn, runInContextTransformer, hookOpts);
}
if (config.hooks.hookRunInThisContext()) {
hook.hookRunInThisContext(
matchFn,
runInThisContextTransformer,
hookOpts
);
if (compareVersions(process.versions.node, '6.0.0') === -1) {
disabler = hook.hookRequire(
matchFn,
requireTransformer,
hookOpts
);
}
} else {
disabler = hook.hookRequire(matchFn, requireTransformer, hookOpts);
const hookFn = function(matchFn) {
const hookOpts = {
verbose: config.verbose,
extensions: config.instrumentation.extensions(),
coverageVariable: coverageVar
};
//initialize the global variable
coverageSetterFn({});
reportInitFn();
if (config.hooks.hookRunInContext()) {
hook.hookRunInContext(matchFn, runInContextTransformer, hookOpts);
}
if (config.hooks.hookRunInThisContext()) {
hook.hookRunInThisContext(
matchFn,
runInThisContextTransformer,
hookOpts
);
if (compareVersions(process.versions.node, '6.0.0') === -1) {
disabler = hook.hookRequire(
matchFn,
requireTransformer,
hookOpts
);
}
} else {
disabler = hook.hookRequire(matchFn, requireTransformer, hookOpts);