Skip to content

d6d64994 - test: cover the CAMT.053 statement builder at 100% - #1395

Merged
TaprootFreak merged 4 commits into
developfrom
test/camt053-builder-coverage
Aug 14, 2026
Merged

d6d64994 - test: cover the CAMT.053 statement builder at 100%#1395
TaprootFreak merged 4 commits into
developfrom
test/camt053-builder-coverage

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

EN:
Add a unit spec that takes the CAMT.053 XML builder to 100% coverage on all four metrics.
The spec covers credit and debit layout, each address field, XML escaping, IBAN whitespace and amount formatting.
No production code, screens, e2e or handbook files change.

DE:
Eine Unit-Spec bringt den CAMT.053-XML-Builder auf 100 % Coverage auf allen vier Metriken.
Die Spec deckt Gutschrift und Belastung, jedes Adressfeld, XML-Escaping, IBAN-Leerzeichen und Betragsformatierung ab.
Produktionscode, Screens, e2e und Handbook bleiben unverändert.

Details

src/util/camt053-builder.ts had no tests. The new file src/__tests__/camt053-builder.test.ts calls only the public buildCamt053Xml helper. Node crypto is installed on globalThis because CRA Jest (jsdom) has no global crypto. Date.prototype.toISOString is stubbed because useFakeTimers({ now }) does not freeze new Date() in this Jest.

Measured locally: 13/13 tests pass; statements/branches/functions/lines all 100% on src/util/camt053-builder.ts. Prettier and ESLint on the new file are clean.

This file was not in any open pull request.

Add a unit spec for credit/debit layout, address fields, XML escaping,
IBAN normalisation and amount formatting.
Restore the crypto global after each case, assert the entry direction
inside Ntry, lock IBAN slots on each side, and cover a debit address.
Pin TxDtls direction counts, the account-header IBAN, BookgDt versus
ValDt, and the three amount interpolations.
Assert the formatted amount inside TxAmt and keep two zero-value
opening and closing balances.
@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 4 review passes.
Adds a unit spec that takes the CAMT.053 XML builder to 100% coverage on all four metrics.

DE:
Bereit nach 4 Review-Durchläufen.
Fügt eine Unit-Spec hinzu, die den CAMT.053-XML-Builder auf 100 % Coverage auf allen vier Metriken bringt.

Details

Gates on head d3929fa424bb5ef69ac2d66d4b1a09fff6fc7784: quality and logic approved. Pass 1 requested crypto restore and stronger layout assertions; pass 2–3 tightened direction, IBAN slots, dates and amount copies; pass 4 had 0 findings. No issue comments, reviews, inline comments or review threads. mergeable: MERGEABLE. Checks on this head: Build and test, Full-stack E2E, review, CodeQL and Analyze all succeeded. No required status checks on develop.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 13, 2026 23:50
@TaprootFreak
TaprootFreak merged commit fdc5824 into develop Aug 14, 2026
9 checks passed
@TaprootFreak
TaprootFreak deleted the test/camt053-builder-coverage branch August 14, 2026 06:52
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.

1 participant