diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-28 17:05:36 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-02 17:34:29 +0800 |
commit | 4d9029bb0e3b215efdf165704c80d3bacef0e85a (patch) | |
tree | 8f699dcd0a7b5fba3c31c065a62d640407bba8c3 /packages/metacoin/test/utils/coverage.ts | |
parent | bc49dde4d5d24b9a8b01459bde061f9b23fb5898 (diff) | |
download | dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.gz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.bz2 dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.lz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.xz dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.zst dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.zip |
Add metacoin example project
Diffstat (limited to 'packages/metacoin/test/utils/coverage.ts')
-rw-r--r-- | packages/metacoin/test/utils/coverage.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/metacoin/test/utils/coverage.ts b/packages/metacoin/test/utils/coverage.ts new file mode 100644 index 000000000..5115dec0e --- /dev/null +++ b/packages/metacoin/test/utils/coverage.ts @@ -0,0 +1,22 @@ +import { CoverageSubprovider } from '@0xproject/sol-cov'; +import * as _ from 'lodash'; + +import { devConstants } from '@0xproject/dev-utils'; + +let coverageSubprovider: CoverageSubprovider; + +export const coverage = { + getCoverageSubproviderSingleton(): CoverageSubprovider { + if (_.isUndefined(coverageSubprovider)) { + coverageSubprovider = coverage._getCoverageSubprovider(); + } + return coverageSubprovider; + }, + _getCoverageSubprovider(): CoverageSubprovider { + const artifactsPath = 'artifacts'; + const contractsPath = 'contracts'; + const networkId = 50; + const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS; + return new CoverageSubprovider(artifactsPath, contractsPath, networkId, defaultFromAddress); + }, +}; |