diff options
Diffstat (limited to 'packages/dev-utils/src/coverage.ts')
-rw-r--r-- | packages/dev-utils/src/coverage.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/packages/dev-utils/src/coverage.ts b/packages/dev-utils/src/coverage.ts index b39fa5de4..db87e2285 100644 --- a/packages/dev-utils/src/coverage.ts +++ b/packages/dev-utils/src/coverage.ts @@ -3,12 +3,17 @@ import * as _ from 'lodash'; let coverageSubprovider: CoverageSubprovider; -export function getCoverageSubproviderSingleton(): CoverageSubprovider { - if (_.isUndefined(coverageSubprovider)) { +export const coverage = { + getCoverageSubproviderSingleton(): CoverageSubprovider { + if (_.isUndefined(coverageSubprovider)) { + coverageSubprovider = coverage._getCoverageSubprovider(); + } + return coverageSubprovider; + }, + _getCoverageSubprovider(): CoverageSubprovider { const artifactsPath = './src/artifacts'; const contractsPath = './src/contracts'; const networkId = 50; - coverageSubprovider = new CoverageSubprovider(artifactsPath, contractsPath, networkId); - } - return coverageSubprovider; -} + return new CoverageSubprovider(artifactsPath, contractsPath, networkId); + }, +}; |