Skip to content

test(signing): 100% src coverage — cover the tiny-secp256k1 loader failure arms - #77

Merged
joeblau merged 2 commits into
mainfrom
test/fastwallet-loader-coverage
Jul 27, 2026
Merged

test(signing): 100% src coverage — cover the tiny-secp256k1 loader failure arms#77
joeblau merged 2 commits into
mainfrom
test/fastwallet-loader-coverage

Conversation

@joeblau

@joeblau joeblau commented Jul 27, 2026

Copy link
Copy Markdown

What

Two commits:

  1. Coverage: the last 3 lines to 100%src/signing/_fastWallet.ts lines 54-55/58 (the real loadTinySecp256k1 shape-check-reject and import-reject arms) were the only uncovered lines left in src/ (repo at 99.969%). ESM module records are immutable, so no tests-only mechanism can fail the real import (verified extensively in test(coverage): close the coverage tail on shims, signing internals, decimal formatting #76). The import is now behind a defaulted parameter — production behavior byte-identical — and the new tests drive both failure arms plus the pass-through and the default real import. Result: 9659/9659 lines = 100.0000%.
  2. Unblock check:docs — a GitBook sync commit pushed outside CI added docs/guides/README.md + docs/reference/README.md without SUMMARY.md entries and with MD012 double blanks, failing check:docs on main for everyone. Listed both in SUMMARY.md and fixed the blanks.

Verification

  • bun run check: all stages pass (was failing on main at check:docs before commit 2)
  • HL_OFFLINE=1 bun test tests/ --coverage: 1854 tests, 0 fail; src/ at 100.0000% line coverage

joeblau added 2 commits July 26, 2026 22:17
… coverage)

The real loadTinySecp256k1 failure internals (shape-check reject, import
reject) were the last 3 uncovered lines in src/: ESM module records are
immutable, so no tests-only mechanism can make the real import fail.
Factor the import behind a defaulted parameter — production behavior
unchanged — so tests drive the same failure lines through the exported
test seam (mirrors the _setEccLoaderForTests convention).
A GitBook sync (5d54a5e, pushed outside CI) added docs/guides/README.md
and docs/reference/README.md without SUMMARY.md entries and with double
blank lines, failing check:docs (docs_check + markdownlint) for everyone.
@joeblau
joeblau merged commit b00b460 into main Jul 27, 2026
6 checks passed
@joeblau
joeblau deleted the test/fastwallet-loader-coverage branch July 27, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant