-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make disconnect params optional in types #4833
Conversation
Pull Request Test Coverage Report for Build 2017514570
💛 - Coveralls |
The failure is 'Failed to connect to Infura over websockets after 10 tries' which I don't think is a consequence of this very minor PR; it seems more likely to be an issue at Infura related to some connectivity issues they've been having lately. Also, I'm not sure if the IP address being used for the test is in the range of newly censored IP addresses intentionally blocked from connecting to Infura, or one of those adjacent to it in some way that leads it to get caught up in the block. The post about test code coverage changing is also inaccurate. This PR shouldn't change test coverage, and doesn't even touch the files cited as having new missed lines. |
mostly just to kick off CI again.
Thought it is an improvement worth merging in, the extra change was intended just to kick off the CI again because I don't have permission to do that directly, and note that the tests are unreliable when run locally. It produced the same issue, which I think is an Infura or testing infrastructure issue rather than a bug newly added in the branch proposed for merging. |
Description
Though the
disconnect
function isn't documented, in practice it does not seem to require two params, and the main example given omits them. The second is absent in multiple tests. Both are absent in other tests.The implementation which does seem to want it can be found here but the first parameter has an effective default value of
1000
and the second is only passed on tothis.connection.close()
which is implemented here. That implementation only passes it on tothis._connection.close()
and as seen by parameterless calls to the same function two lines below each two-parameter call, those are optional.Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success. [Noting that the tests are unreliable on the base branch.]npm run test:cov
and my test cases cover all the lines and branches of the added code. [This command's use of semicolons instead of ampersands mean this superset of the line above has been broken for years. Fixing it here seems unnecessary: Existing test cases cover the change, or would if they were TypeScript, but changing that is beyond the scope of this PR.]npm run build
with success.dist/web3.min.js
in a browser. [This doesn't make changes in compiled code.]CHANGELOG.md
file in the root folder.