How to use solidity-coverage - 1 common examples

To help you get started, we’ve selected a few solidity-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 AugurProject / augur / packages / augur-core / source / tools / generateCoverageReport.js View on Github external
const { execSync } = require('child_process');
const copydir = require('copy-dir');
const replace = require("replace");
const rimraf = require('rimraf');
const fs = require('fs');

const COMPILE_COMMAND = "INPUT_PATH=coverageEnv OUTPUT_PATH=coverageEnv/build/ yarn build:contracts"

const config = {
    dir: './source',
    skipFiles: [],
    copyNodeModules: false,
    compileCommand: "echo SKIPPING COMPILE"

const app = new App(config);

death((signal, err) => app.cleanUp(err));

copydir.sync('./source/contracts', './coverageEnv/contracts')


copydir.sync('./tests/solidity_test_helpers', './coverageEnv/solidity_test_helpers')

    regex: " view | pure ",
    replacement: " ",
    paths: fs.readdirSync('./coverageEnv/solidity_test_helpers').map(filename => './coverageEnv/solidity_test_helpers/' + filename),
    silent: false,


[![Gitter chat](][18] ![npm (tag)]( [![CircleCI](][20] [![codecov](https://codec

Latest version published 9 months ago

Package Health Score

71 / 100
Full package analysis

Popular solidity-coverage functions

Similar packages

Popular JavaScript code snippets

Find secure code to use in your application or website