update yara

This commit is contained in:
2026-09-07 10:47:32 +03:30
parent d52d18a97c
commit 470f6e0920
8 changed files with 103 additions and 24 deletions

View File

@@ -0,0 +1,46 @@
import { ClaimCaseStatus } from "src/Types&Enums/claim-request-management/claim-case-status.enum";
import { fanavaranClaimReferences } from "./fanavaran-claim-references";
describe("fanavaranClaimReferences", () => {
it("returns all four Fanavaran ids when the claim is completed", () => {
expect(
fanavaranClaimReferences({
status: ClaimCaseStatus.COMPLETED,
claimId: 987654,
claimNo: 123456,
dmgCaseId: 11,
expertiseId: 22,
}),
).toEqual({
claimId: 987654,
claimNo: 123456,
dmgCaseId: 11,
expertiseId: 22,
});
});
it("omits missing ids", () => {
expect(
fanavaranClaimReferences({
status: ClaimCaseStatus.COMPLETED,
claimId: 987654,
claimNo: null,
dmgCaseId: undefined,
expertiseId: 22,
}),
).toEqual({
claimId: 987654,
expertiseId: 22,
});
});
it("returns undefined before the claim is completed", () => {
expect(
fanavaranClaimReferences({
status: ClaimCaseStatus.EXPERT_REVIEWING,
claimId: 987654,
dmgCaseId: 11,
}),
).toBeUndefined();
});
});