Skip to content

Fix isolated parser tests for Bitgesell config - #12

Open
cedar323 wants to merge 1 commit into
BitgesellOfficial:mainfrom
cedar323:fix/parser-test-bitgesell-config
Open

Fix isolated parser tests for Bitgesell config#12
cedar323 wants to merge 1 commit into
BitgesellOfficial:mainfrom
cedar323:fix/parser-test-bitgesell-config

Conversation

@cedar323

@cedar323 cedar323 commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • update parser tests to use the existing bitgesell / bitgesellMultiWallet test config keys
  • mock the remaining parser RPC responses with nock so parser_test.js can run without a local BGLd/Docker service
  • keep the batch headers case aligned with dynamically generated RPC ids

Verification

  • $env:NODE_ENV='test'; node node_modules\mocha\bin\mocha --timeout 20000 --recursive --require should test\parser_test.js --reporter spec passes on Windows
  • git diff --check reports no patch whitespace errors; Git only warns about local CRLF normalization

Note: this PR is intentionally independent from #11 and only touches test/parser_test.js.

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainer-facing review assist for the #39 bounty queue:

I would treat this as a focused test-fix candidate, not a runtime RPC behavior change. It only touches test/parser_test.js (+33/-7) and moves the parser cases from the stale config.bitcoin / config.bitcoinMultiWallet keys to the Bitgesell test config keys. The added nock mocks also make the parser/header cases self-contained, so this file no longer needs a local BGLd/Docker service just to exercise parser behavior.

Acceptance checks I would ask for before merge:

  • Run the exact Windows command from the PR body, plus a POSIX equivalent such as NODE_ENV=test ./node_modules/.bin/mocha --timeout 20000 --recursive --require should test/parser_test.js --reporter spec, so the fix is not only PowerShell-validated.
  • Keep the dynamic batch-response id: request.id behavior; that is the important part of the headers batch case because request IDs are generated at runtime.
  • Keep this separate from Fix npm test runner on Windows #11 as the author notes, because Fix npm test runner on Windows #11 changes the npm runner while this PR only isolates parser tests.

This looks bounty-relevant under BitgesellOfficial/bitgesell#39 because that issue explicitly includes one test group/file fixed by a single PR, but payout/priority still needs maintainer confirmation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants