Skip to content

Commit

Permalink
Sol-coverage fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MickdeGraaf committed Nov 11, 2020
1 parent 856f8a6 commit 8613df8
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 20 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"test:fast": "TS_NODE_TRANSPILE_ONLY=1 npx buidler test",
"compile": "npx buidler compile --config buidler.compile.config.ts",
"typechain": "typechain --target ethers-v5 --outDir typechain ./artifacts/**/*.json",
"coverage": "npx buidler coverage --network coverage",
"docgen": "solidity-docgen --solc-module solc-0.7 --output-structure readmes",
"coverage": "npx buidler coverage --network coverage --temp artifacts",
"build": "yarn compile --force && yarn typechain",
"remix": "remixd -s . --remix-ide https://remix.ethereum.org"
},
Expand Down Expand Up @@ -41,6 +42,8 @@
"mocha": "^8.1.3",
"prettier": "^2.1.1",
"prettier-plugin-solidity": "^1.0.0-alpha.57",
"solc-0.7": "npm:solc@^0.7.0",
"solidity-docgen": "^0.5.7",
"standard": "^14.3.4",
"typescript": "^4.0.3"
}
Expand Down
26 changes: 17 additions & 9 deletions solcover.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
const shell = require('shelljs'); // This module is already a solidity-coverage dep

module.exports = {
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
invert: true // Run the grep's inverse set.
},
providerOptions: {
gasLimit: 1000000000,
allowUnlimitedContractSize: true
}
}
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
invert: true // Run the grep's inverse set.
},
providerOptions: {
gasLimit: 1000000000,
allowUnlimitedContractSize: true
},
onCompileComplete: async function(config){
await run('typechain');
},
onIstanbulComplete: async function(config){
shell.rm('-rf', './typechain'); // Clean up at the end
}
}
2 changes: 1 addition & 1 deletion test/LendingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe("LendingManager", function() {

lendingRegistry = await (new LendingRegistryFactory(signers[0])).deploy();

lendingLogicAave = await (new LendingLogicAaveFactory(signers[0])).deploy(aaveLendingPool.address);
lendingLogicAave = await (new LendingLogicAaveFactory(signers[0])).deploy(aaveLendingPool.address, 0);
lendingLogicCompound = await (new LendingLogicCompoundFactory(signers[0])).deploy(lendingRegistry.address);

// Setup lending registry
Expand Down
3 changes: 1 addition & 2 deletions test/lendingLogicAave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ describe("LendingLogicAave", function() {
await token.mint(mintAmount, account);

lendingPool = await deployContract(signers[0], MockAaveLendingPoolArtifact, [token.address, aToken.address]) as MockAaveLendingPool;
lendingLogic = await deployContract(signers[0], LendingLogicAaveArtifact, [lendingPool.address]) as LendingLogicAave;

lendingLogic = await deployContract(signers[0], LendingLogicAaveArtifact, [lendingPool.address, 0]) as LendingLogicAave;

await timeTraveler.snapshot();
});
Expand Down
Loading

0 comments on commit 8613df8

Please sign in to comment.