Skip to content

Conversation

@ChristopherDedominici
Copy link
Contributor

@ChristopherDedominici ChristopherDedominici commented Oct 28, 2025

I believe there is a bug in how we generate the coverage data.
To validate this, I created a test using vitest and applied the same logic in a test contract.
When running vitest and comparing the results with the hardhat coverage, there is a mismatch in:

  • percentage of executed lines

  • uncovered lines

    See coverage report here:

image

How to repro:

  • checkout the branch of this PR
  • cd v-next/example-project
  • run pnpm i && pnpm clean && pnpm build
  • run pnpm hardhat test solidity contracts/Coverage.t.sol --coverage to run the hardhat coverage
  • run pnpm vitest run vitest-example/index.test.js --coverage to run the vitest coverage

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: 7707790

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

hardhat

Total size of the bundle: 235M
Total number of dependencies (including transitive): 47

List of dependencies (sorted by size)
229M	total
35M	@nomicfoundation/edr-linux-x64-musl
35M	@nomicfoundation/edr-linux-x64-gnu
32M	@nomicfoundation/edr-linux-arm64-musl
32M	@nomicfoundation/edr-linux-arm64-gnu
24M	@nomicfoundation/edr-win32-x64-msvc
24M	@nomicfoundation/edr-darwin-x64
20M	@nomicfoundation/edr-darwin-arm64
7.3M	@sentry/core
5.2M	zod
2.7M	micro-eth-signer
1.9M	@noble/curves
1.7M	undici
1.2M	@noble/hashes
984K	@nomicfoundation/hardhat-utils
864K	@streamparser/json
624K	micro-packed
592K	tsx
548K	@nomicfoundation/hardhat-errors
492K	@scure/bip39
464K	@nomicfoundation/edr
452K	fast-equals
408K	json-stream-stringify
368K	ethereum-cryptography
332K	@streamparser/json-node
320K	enquirer
320K	@nomicfoundation/hardhat-zod-utils
288K	semver
200K	ws
180K	chokidar
176K	get-tsconfig
168K	@scure/base
160K	esbuild
136K	adm-zip
96K	@scure/bip32
92K	chalk
72K	@nomicfoundation/solidity-analyzer
68K	debug
60K	readdirp
56K	rfdc
48K	ansi-colors
44K	resolve.exports
40K	resolve-pkg-maps
36K	p-map
24K	strip-ansi
24K	env-paths
24K	ansi-regex
20K	ms

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​vitest/​coverage-istanbul@​3.2.4991006799100
Addedvitest@​3.2.4981007999100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Code coverage numbers do not match test execution number

3 participants