aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-cov')
-rw-r--r--packages/sol-cov/src/collect_contract_data.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/sol-cov/src/collect_contract_data.ts b/packages/sol-cov/src/collect_contract_data.ts
index a0ce2640f..e4a13695a 100644
--- a/packages/sol-cov/src/collect_contract_data.ts
+++ b/packages/sol-cov/src/collect_contract_data.ts
@@ -17,11 +17,8 @@ export const collectContractsData = (artifactsPath: string, sourcesPath: string,
return {};
}
const artifact = JSON.parse(fs.readFileSync(artifactFileName).toString());
- const sources = _.map(artifact.networks[networkId].sources, source => {
- const includedFileName = glob.sync(`${sourcesPath}/**/${source}`, { absolute: true })[0];
- return includedFileName;
- });
- const sourceCodes = _.map(sources, source => {
+ const sources = artifact.networks[networkId].sources;
+ const sourceCodes = _.map(sources, (source: string) => {
const includedSourceCode = fs.readFileSync(source).toString();
return includedSourceCode;
});