mirror of
https://github.com/luxfi/bank.git
synced 2026-10-30 17:02:07 +00:00
The published client now has tests that lock its wire contract: every
Bank method's path/verb/body against a mock fetch, per-request token
evaluation, path-param encoding (an id can't traverse), the
transfer/pay positional→body mapping, issueCard's {card,cvv}, and that
errors throw a typed BankError with status+body. `pnpm test` (node's
built-in runner, zero deps).
BankError now declares its fields explicitly instead of via constructor
parameter properties, so the source runs under type-stripping runtimes
(Node native TS, Deno, bun) — which is also what let the test import the
source directly.
Co-authored-by: Hanzo Dev <[email protected]>