aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-04-10 03:54:50 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-04-12 18:52:21 +0800
commit783314c037a85effbc377fdc01cd40235ad388ed (patch)
treea9b531af9b5a6cfdc34674baf9c874c303a11072 /packages/sol-cov/src
parent15cf64318ccc852fa2e779ea4e3685a406bab851 (diff)
downloaddexon-0x-contracts-783314c037a85effbc377fdc01cd40235ad388ed.tar.gz
dexon-0x-contracts-783314c037a85effbc377fdc01cd40235ad388ed.tar.zst
dexon-0x-contracts-783314c037a85effbc377fdc01cd40235ad388ed.zip
Improve on readability
Diffstat (limited to 'packages/sol-cov/src')
-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;
});