test: align constructor port expectations with Bitgesell - #10
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Client unit tests to reflect a new default mainnet port and removes the regtest default-port expectation.
Changes:
- Update
mainnetdefault port assertions from8332to8454. - Remove the test asserting
regtestdefaults to port18332.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| it('should set default to port `18332` if network is `testnet`', () => { | ||
| should(new Client({ network: 'testnet' }).port).equal(18332); | ||
| }); | ||
|
|
||
| it('should set default to port `18332` if network is `regtest`', () => { | ||
| should(new Client({ network: 'regtest' }).port).equal(18332); | ||
| }); | ||
|
|
||
| it('should not have ssl enabled by default', () => { | ||
| should(new Client().ssl.enabled).equal(false); | ||
| should(new Client().ssl.strict).equal(false); |
|
Maintainer review-assist for the Bitgesell #81 improvement lane: This looks like a clean one-file test-only update: the Before merge, I would make the removed
That keeps the #81 payout scope narrow: test expectation alignment only, with no live RPC calls, credentials, wallet actions, or network dependency. |
Description
This bounty/improvement PR aligns the constructor tests with the Bitgesell RPC defaults implemented by the client.
src/index.jsdefines the supported networks as:mainnet: 8454testnet: 18332But
test/client_test.jsstill had inherited Bitcoin Core expectations for the default/mainnet port (8332) and aregtestconstructor case even thoughregtestis not in the client's supported network map. This PR updates the constructor expectations so the tests match the Bitgesell client behavior.Verification
./node_modules/.bin/eslint test/client_test.jsnew Client().port === 8454new Client({ network: 'mainnet' }).port === 8454new Client({ network: 'testnet' }).port === 18332new Client({ network: 'regtest' })throwsInvalid network namegit diff --checkBounty / payout
Submitted under the Bitgesell PR bounty/improvement program referenced from BitgesellOfficial/bitgesell#32 and BitgesellOfficial/bitgesell#39.
If approved, USDT/USDC EVM-compatible payout address:
0xd6634800410978b62D4a2317dCAF2871CDa9e1D3