d6d64994 - test: cover the CAMT.053 statement builder at 100% - #1395
Merged
Conversation
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.
Contributor
Author
|
EN: DE: DetailsGates on head |
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.
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.tshad no tests. The new filesrc/__tests__/camt053-builder.test.tscalls only the publicbuildCamt053Xmlhelper. Nodecryptois installed onglobalThisbecause CRA Jest (jsdom) has no globalcrypto.Date.prototype.toISOStringis stubbed becauseuseFakeTimers({ now })does not freezenew 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.