Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const prepareCoverage = async (workingDirectory, port, ignoreFiles) => {
let artifactAdapter = new SolCompilerArtifactAdapter(artifacts, workingDirectory);
let coverageSubproviderConfig = {
isVerbose,
ignoreFilesGlobs: ['**/node_modules/**']
}
if (ignoreFiles) {
ignoreFiles = ignoreFiles.split(',')
ignoreFiles = ignoreFiles.map(file => "**/" + file)
coverageSubproviderConfig.ignoreFilesGlobs = coverageSubproviderConfig.ignoreFilesGlobs.concat(ignoreFiles)
}
global.coverageSubprovider = new CoverageSubprovider(
artifactAdapter,
defaultFromAddress,
coverageSubproviderConfig
);
_getCoverageSubprovider(): CoverageSubprovider {
const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter();
const isVerbose = true;
const subprovider = new CoverageSubprovider(solCompilerArtifactAdapter, defaultFromAddress, isVerbose);
return subprovider;
},
};