Zentralen BIC-Abgleich robust machen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 44s
Build and Push Docker Images / build-frontend (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 21s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 23s
Build and Push Docker Images / build-docs (push) Successful in 21s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 44s
Build and Push Docker Images / build-frontend (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 21s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 23s
Build and Push Docker Images / build-docs (push) Successful in 21s
This commit is contained in:
18
backend/tests/bankingInstitution.test.ts
Normal file
18
backend/tests/bankingInstitution.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import test from "node:test"
|
||||
import assert from "node:assert/strict"
|
||||
|
||||
import { findBankInstitutionByBic } from "../src/modules/banking-institution"
|
||||
|
||||
test("finds a banking institution by BIC case-insensitively", () => {
|
||||
const institution = findBankInstitutionByBic([
|
||||
{ id: "without-bic" },
|
||||
{ id: "slz", bic: "slzode22xxx" },
|
||||
], " SLZODE22XXX ")
|
||||
|
||||
assert.equal(institution?.id, "slz")
|
||||
})
|
||||
|
||||
test("ignores institutions without a BIC instead of throwing", () => {
|
||||
assert.equal(findBankInstitutionByBic([{ id: "without-bic" }], "SLZODE22XXX"), null)
|
||||
assert.equal(findBankInstitutionByBic(null, "SLZODE22XXX"), null)
|
||||
})
|
||||
Reference in New Issue
Block a user