How to use the @0x/sol-coverage.SolCompilerArtifactAdapter function in @0x/sol-coverage

To help you get started, we’ve selected a few @0x/sol-coverage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LimeChain / etherlime / packages / etherlime / cli-commands / etherlime-test / etherlime-coverage.js View on Github external
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
	);
github 0xProject / 0x-monorepo / contracts / test-utils / src / coverage.ts View on Github external
_getCoverageSubprovider(): CoverageSubprovider {
        const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
        const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter();
        const isVerbose = true;
        const subprovider = new CoverageSubprovider(solCompilerArtifactAdapter, defaultFromAddress, isVerbose);
        return subprovider;
    },
};

@0x/sol-coverage

Generate coverage reports for Solidity code

Apache-2.0
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages