-
Notifications
You must be signed in to change notification settings - Fork 7
/
.solcover.js
79 lines (69 loc) · 2.57 KB
/
.solcover.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
let coverageReportOutputDirectory = "coverage-all"
let extraFilesToIgnore = []
let isUnitTests =
!!process.env.DONT_RUN_INTEGRATION_TESTS && process.env.DONT_RUN_INTEGRATION_TESTS.toUpperCase() == "TRUE"
let isIntegrationTests =
!!process.env.DONT_RUN_UNIT_TESTS && process.env.DONT_RUN_UNIT_TESTS.toUpperCase() == "TRUE"
if (isUnitTests) {
coverageReportOutputDirectory = "coverage-unit"
extraFilesToIgnore = [
"FloatToken.sol",
"SyntheticToken.sol",
"TokenFactory.sol",
"Treasury_v0.sol",
]
} else if (isIntegrationTests) {
coverageReportOutputDirectory = "coverage-integration"
} else if (!isUnitTests && !isIntegrationTests) { // if it is neither then it is both (wierd logic but it works)
// Don't do anything in this case
} else {
throw Error("Invalid config, don't set both 'DONT_RUN_INTEGRATION_TESTS' and 'DONT_RUN_UNIT_TESTS' to true")
}
module.exports = {
skipFiles: [
"FloatCapital_v0.sol",
"Treasury_v0.sol",
"AlphaTestFLT.sol",
"StakingStrategy.sol",
"StrategyToken.sol",
"SyntheticTokenUpgradeable.sol",
"TreasuryAlpha.sol",
"YieldManagerAave.sol",
"deployment/UUPSProxy.sol",
"interfaces/IFloatToken.sol",
"interfaces/ILongShort.sol",
"interfaces/IOracleManager.sol",
"interfaces/IStaker.sol",
"interfaces/ISyntheticToken.sol",
"interfaces/ITokenFactory.sol",
"interfaces/IYieldManager.sol",
"interfaces/aave/DataTypes.sol",
"interfaces/aave/ILendingPool.sol",
"interfaces/aave/ILendingPoolAddressesProvider.sol",
"mocks/BandOracleMock.sol",
"mocks/Dai.sol",
"mocks/MockERC20.sol",
"mocks/OracleManagerMock.sol",
"mocks/YieldManagerMock.sol",
"mocks/AggregatorV3Mock.sol",
"mocks/ERC20Mock.sol",
"mocks/LendingPoolAaveMock.sol",
"mocks/LendingPoolAddressesProviderMock.sol",
"mocks/LendingPoolAddressesProvider.sol",
"oracles/OracleManagerChainlink.sol",
"oracles/OracleManagerEthKillerChainlink.sol",
"oracles/OracleManagerEthKillerChainlinkTestnet.sol",
"oracles/OracleManagerEthVsBtc.sol",
"oracles/OracleManagerFlippening_V0.sol",
"oracles/OracleManagerChainlinkTestnet.sol",
"oracles/OracleManagerFlipp3ning.sol",
"testing/StakerInternalStateSetters.sol",
"testing/LongShortInternalStateSetters.sol",
"testing/generated/LongShortForInternalMocking.sol",
"testing/generated/StakerForInternalMocking.sol",
"testing/generated/LongShortMockable.sol",
"testing/generated/StakerMockable.sol",
].concat(extraFilesToIgnore),
istanbulFolder: coverageReportOutputDirectory,
configureYulOptimizer: true
};