Skip to content

Commit

Permalink
chore: add code coverage command
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasvdam committed Dec 20, 2024
1 parent 594cc47 commit db7fbb8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
mocha: {
grep: '[Gg]as.*[Aa]nalysis',
invert: true,
},
};
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,20 @@ Available commands:

2. Run tests:
```bash
bun test
bun run test
```

3. Run tests with gas reporting:
3. Run tests with coverage:
```bash
bun run test:coverage
```

4. Run tests with gas reporting:
```bash
bun run test:gas
```

4. Lint and format code:
5. Lint and format code:
```bash
# Run all checks (lint + format)
bun run check
Expand All @@ -151,7 +156,7 @@ Available commands:
bun run format:sol:fix
```

5. Other utilities:
6. Other utilities:
```bash
# Generate test vectors
bun run gen:testvectors
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"prepublish": "bun run clean && bun run compile",
"seda": "hardhat seda",
"test": "hardhat test --grep \"^(?!.*[Gg]as.*[Aa]nalysis).*$\"",
"test:coverage": "COVERAGE=true hardhat coverage",
"test:gas": "REPORT_GAS=true hardhat test --grep \"[Gg]as.*[Aa]nalysis\""
},
"dependencies": {
Expand Down

0 comments on commit db7fbb8

Please sign in to comment.