Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hardhat coverage #133

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .solcover.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
skipFiles: ['upgradeables/marketplace/direct-listings-addon/DirectListingsAddon.sol'],
mocha: {
grep: '@skipCoverage', // Use a tag like @skipCoverage in your test descriptions
invert: true, // This will run tests not matching the grep expression
},
};
4 changes: 4 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@typechain/hardhat';
import 'hardhat-contract-sizer';
import 'solidity-coverage';
// This adds support for typescript paths mappings
import 'tsconfig-paths/register';
import '@openzeppelin/hardhat-upgrades';
Expand All @@ -27,6 +28,9 @@ const config: HardhatUserConfig = {
optimizer: {
enabled: true,
runs: 1,
details: {
yul: true,
},
},
viaIR: true,
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"solhint": "solhint ./contracts/**/*.sol",
"format": "yarn prettier -w ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts contracts/**/*.sol ",
"format:check": "yarn prettier -c ./deploy/**/*.ts ./tasks/**/*.ts ./tests/**/*.ts ./helpers/**/*.ts ./contracts/**/*.sol ",
"coverage": "pnpm dlx hardhat coverage",
"coverage": "TS_NODE_TRANSPILE_ONLY=true SOLIDITY_COVERAGE=true hardhat coverage --solcoverjs .solcover.ts",
"coverage:foundry": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage",
"generate:types": "pnpm dlx hardhat typechain"
},
Expand Down
2 changes: 1 addition & 1 deletion test/zkSync/erc20ChainlinkPaymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenv.config();
// load wallet private key from env file
const PRIVATE_KEY = process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80';

describe('ERC20ChainlinkPaymaster', function () {
describe('@skipCoverage ERC20ChainlinkPaymaster', function () {
let provider: Provider;
let minterAccount: Wallet;
let deployer: Deployer;
Expand Down
2 changes: 1 addition & 1 deletion test/zkSync/erc20PythPaymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dotenv.config();
// load wallet private key from env file
const PRIVATE_KEY = process.env.PRIVATE_KEY || '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80';

describe('ERC20PythPaymaster', function () {
describe('@skipCoverage ERC20PythPaymaster', function () {
let provider: Provider;
let minterAccount: Wallet;
let deployer: Deployer;
Expand Down
Loading