Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Fixed unit tests & removed dead code for web3-providers-http - #5228

Merged
jdevcs merged 3 commits into
junaid/httpproviderfixtestsfrom
unknown repository
Jul 19, 2022
Merged

Fixed unit tests & removed dead code for web3-providers-http#5228
jdevcs merged 3 commits into
junaid/httpproviderfixtestsfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 12, 2022

Copy link
Copy Markdown

Fixes #5235, Fixes #5236

Description

Use fetch-mock to run unit tests against web3-providers-http and removed some dead code for web3-providers-http.

Also fixed issue #5235 that timeout option being ignored.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have selected the correct base branch.
  • 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.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build with success.
  • I have tested the built dist/web3.min.js in 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.md file in the root folder.

@coveralls

coveralls commented Jul 12, 2022

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2694984724

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 74.599%

Files with Coverage Reduction New Missed Lines %
packages/web3-providers-http/lib/index.js 7 77.14%
Totals Coverage Status
Change from base Build 2678847914: 0.2%
Covered Lines: 3269
Relevant Lines: 4131

💛 - Coveralls

@ghost ghost mentioned this pull request Jul 16, 2022
@jdevcs

jdevcs commented Jul 18, 2022

Copy link
Copy Markdown
Contributor

@ayanamidev This branch is out-of-date with the base branch

@ghost

ghost commented Jul 19, 2022

Copy link
Copy Markdown
Author

@jdevcs @nazarhussain @luu-alex Rebased.

@jdevcs
jdevcs changed the base branch from 1.x to junaid/httpproviderfixtests July 19, 2022 10:27
@jdevcs
jdevcs merged commit 2dabd15 into web3:junaid/httpproviderfixtests Jul 19, 2022
jdevcs added a commit that referenced this pull request Jul 19, 2022
…5264)

* Fixed unit tests & removed dead code for web3-providers-http (#5228)

* Fixed unit tests & removed dead code for web3-providers-http

* Use chai-as-promised to resolve or reject promise

* Fixed bug that timeout option doesn't work properly

* change log update

Co-authored-by: Ayanami <ayanami0330@protonmail.com>
@jdevcs

jdevcs commented Jul 19, 2022

Copy link
Copy Markdown
Contributor

Merged via #5264

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect handling of non-json response from the remote node for HttpProvider Timeout option being ignored for HttpProvider

4 participants