Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createTestProvider = projectRoot => {
const testProvider = new ProviderEngine();
const artifactAdapter = new TruffleArtifactAdapter(
`${projectRoot}`,
solcVersion
);
const coverageSubProvider = new CoverageSubprovider(
artifactAdapter,
defaultFromAddress,
isVerbose
);
global.coverageSubProvider = coverageSubProvider;
testProvider.addProvider(coverageSubProvider);
testProvider.addProvider(
new RevertTraceSubprovider(artifactAdapter, defaultFromAddress, isVerbose)
);