diff --git a/.solcover.js b/.solcover.js new file mode 100644 index 0000000..c42fba8 --- /dev/null +++ b/.solcover.js @@ -0,0 +1,6 @@ +module.exports = { + mocha: { + grep: '[Gg]as.*[Aa]nalysis', + invert: true, + }, +}; diff --git a/README.md b/README.md index 33877c8..e7d9df5 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/package.json b/package.json index 0956dc0..7f7c5b0 100644 --- a/package.json +++ b/package.json @@ -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": {