Skip to content

Commit

Permalink
code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Wolny authored and Szymon Wolny committed Jan 5, 2023
1 parent 5782f08 commit 737873d
Show file tree
Hide file tree
Showing 5 changed files with 4,894 additions and 430 deletions.
11 changes: 9 additions & 2 deletions smart-contract-testing-hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ Covered test cases:
- contract deployment
- correct contract's initial balance setup
- revert invocation
- event invokcation
- event invocation
- contract's balance change
- contract removal
- only owner check

Used features:
- fixture
- fixtures
- before function
- contract mock
- deployment and testing on goerli network

**Code coverage**

`solidity-coverage` was used to check the code coverage.

```
npm run coverage
```
7 changes: 3 additions & 4 deletions smart-contract-testing-hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import { config as dotEnvConfig } from "dotenv"
import "solidity-coverage";

dotEnvConfig()

const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
},
goerli: {
url: process.env.GOERLI_RPC_URL,
accounts: [process.env.PRIVATE_KEY],
url: process.env.GOERLI_RPC_URL || '',
accounts: process.env.PRIVATE_KEY,
allowUnlimitedContractSize: true
}
},
Expand Down
Loading

0 comments on commit 737873d

Please sign in to comment.