test(signing): 100% src coverage — cover the tiny-secp256k1 loader failure arms - #77
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two commits:
src/signing/_fastWallet.tslines 54-55/58 (the realloadTinySecp256k1shape-check-reject and import-reject arms) were the only uncovered lines left insrc/(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%.check:docs— a GitBook sync commit pushed outside CI addeddocs/guides/README.md+docs/reference/README.mdwithoutSUMMARY.mdentries and with MD012 double blanks, failingcheck:docson 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