Skip to content

feat(abstract-utxo): modernize test infrastructure#8285

Merged
OttoAllmendinger merged 2 commits intomasterfrom
BTC-2768.remove-shouldjs
Mar 13, 2026
Merged

feat(abstract-utxo): modernize test infrastructure#8285
OttoAllmendinger merged 2 commits intomasterfrom
BTC-2768.remove-shouldjs

Conversation

@OttoAllmendinger
Copy link
Contributor

@OttoAllmendinger OttoAllmendinger commented Mar 12, 2026

Replace shouldjs assertions with Node.js native assert/strict
throughout the abstract-utxo module test suite. This modernizes
testing infrastructure and eliminates a deprecated dependency.

Main changes:

  • Switch to node:assert/strict for all assertions
  • Add helper functions: assertHasProperty, assertContains,
    assertEqualJSON
  • Update Sinon assertion syntax to use sinon.assert.* methods
  • Simplify assertion patterns across unit and integration tests
  • Align fmt script with check-fmt for consistency in formatting
    operations

Issue: BTC-2768

@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2768.remove-shouldjs branch 2 times, most recently from 72aaa50 to 47dc824 Compare March 12, 2026 15:48
Update fmt script to use the same file pattern as check-fmt for
consistency in formatting operations.

Co-authored-by: llm-git <llm-git@ttll.de>

Issue: BTC-2768
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2768.remove-shouldjs branch from 47dc824 to 8dbae2d Compare March 13, 2026 08:50
Replace shouldjs assertions with Node.js native assert/strict
throughout the abstract-utxo module test suite. This modernizes
testing infrastructure and eliminates a deprecated dependency.

Main changes:
- Switch to node:assert/strict for all assertions
- Add helper functions: `assertHasProperty`, `assertContains`, `assertEqualJSON`
- Add `isPsbt` utility function for checking PSBT magic bytes
- Update Sinon assertion syntax to use `sinon.assert.*` methods
- Simplify assertion patterns across unit and integration tests

Issue: BTC-2768

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2768.remove-shouldjs branch from 8dbae2d to c6d44f2 Compare March 13, 2026 09:09
@OttoAllmendinger OttoAllmendinger changed the title feat(abstract-utxo): replace shouldjs with node:assert feat(abstract-utxo): modernize test infrastructure Mar 13, 2026
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review March 13, 2026 09:33
@OttoAllmendinger OttoAllmendinger requested review from a team as code owners March 13, 2026 09:33
@OttoAllmendinger OttoAllmendinger merged commit 0751d07 into master Mar 13, 2026
20 checks passed
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