forked from Yara724/api
fix: align inquiry errors and expert review rules
This commit is contained in:
@@ -495,6 +495,26 @@ describe("inquiry participant resolver", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves a mapped provider message when the current result is unusable", async () => {
|
||||
const currentPlate = {
|
||||
leftDigits: "44",
|
||||
centerAlphabet: "ب",
|
||||
centerDigits: "111",
|
||||
ir: "22",
|
||||
};
|
||||
|
||||
await expect(
|
||||
runCurrentPlateInquiry({
|
||||
currentPlate,
|
||||
query: async () => ({
|
||||
mapped: { Error: { Message: "رکوردی یافت نشد" } },
|
||||
}),
|
||||
isUsable: () => false,
|
||||
errorMessage: (value) => value.mapped.Error.Message,
|
||||
}),
|
||||
).rejects.toThrow("رکوردی یافت نشد");
|
||||
});
|
||||
|
||||
it("retains one failed current-plate attempt after a provider outage", async () => {
|
||||
const currentPlate = {
|
||||
leftDigits: "44",
|
||||
|
||||
Reference in New Issue
Block a user