fix: correctly close ws connection in web3-eth-contract integration tests
Description
Correctly close ws connection in web3-eth-contract integration tests
Fixes #7231
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] I have selected the correct base branch.
- [x] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran
npm run lintwith success and extended the tests and types if necessary. - [ ] I ran
npm run test:unitwith success. - [ ] I ran
npm run test:coverageand my test cases cover all the lines and branches of the added code. - [ ] I ran
npm run buildand testeddist/web3.min.jsin a browser. - [ ] I have tested my code on the live network.
- [ ] I have checked the Deploy Preview and it looks correct.
- [ ] I have updated the
CHANGELOG.mdfile in the root folder. - [ ] I have linked Issue(s) with this PR in "Linked Issues" menu.
Bundle Stats
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 10 | 649.88 kB | 0% |
Changeset
No files were changed
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
| Asset | File Size | % Changed |
|---|---|---|
| web3.min.js | 630.33 kB | 0% |
| ../lib/commonjs/index.d.ts | 8.72 kB | 0% |
| ../lib/commonjs/accounts.d.ts | 3.93 kB | 0% |
| ../lib/commonjs/types.d.ts | 2.67 kB | 0% |
| ../lib/commonjs/web3.d.ts | 1.38 kB | 0% |
| ../lib/commonjs/web3_eip6963.d.ts | 1.28 kB | 0% |
| ../lib/commonjs/abi.d.ts | 1.06 kB | 0% |
| ../lib/commonjs/eth.exports.d.ts | 280 B | 0% |
| ../lib/commonjs/providers.exports.d.ts | 183 B | 0% |
| ../lib/commonjs/version.d.ts | 60 B | 0% |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.51%. Comparing base (
07993c2) to head (1450b8b). Report is 2 commits behind head on 4.x.
Additional details and impacted files
@@ Coverage Diff @@
## 4.x #7338 +/- ##
=======================================
Coverage 94.51% 94.51%
=======================================
Files 218 218
Lines 8557 8557
Branches 2363 2363
=======================================
Hits 8088 8088
Misses 469 469
| Flag | Coverage Δ | |
|---|---|---|
| UnitTests | 94.51% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
With the upgraded version of Geth, some new errors have started to appear. For example, see: this build https://github.com/web3/web3.js/actions/runs/11702836716/job/32591923473 So I had to revert the geth version to the currently used one in the tests.
With the upgraded version of Geth, some new errors have started to appear. For example, see: this build https://github.com/web3/web3.js/actions/runs/11702836716/job/32591923473 So I had to revert the geth version to the currently used one in the tests.
pls see this in detail and open issue in geth,
PR looks good to me