diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-10 03:54:50 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-12 18:52:21 +0800 |
commit | 783314c037a85effbc377fdc01cd40235ad388ed (patch) | |
tree | a9b531af9b5a6cfdc34674baf9c874c303a11072 /packages/sol-cov/src | |
parent | 15cf64318ccc852fa2e779ea4e3685a406bab851 (diff) | |
download | dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar.gz dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar.bz2 dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar.lz dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar.xz dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.tar.zst dexon-sol-tools-783314c037a85effbc377fdc01cd40235ad388ed.zip |
Improve on readability
Diffstat (limited to 'packages/sol-cov/src')
-rw-r--r-- | packages/sol-cov/src/collect_contract_data.ts | 7 |
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; }); |