Feat/sas otp error handling * Improve error handling for SAS OTP * Remove failing and deprecated test Approved-by: Joakim Jäderberg
18 lines
484 B
TypeScript
18 lines
484 B
TypeScript
import { describe, expect, it } from "@jest/globals"
|
|
|
|
import { parseSASRequestOtpError } from "./requestOtpError"
|
|
|
|
describe("requestOtpError", () => {
|
|
it("parses error with invalid error code", () => {
|
|
const actual = parseSASRequestOtpError({
|
|
status: "status",
|
|
error: "error",
|
|
errorCode: "a" as unknown as number,
|
|
databaseUUID: "9ffefefe-df0e-4229-9792-5ed31bef1db4",
|
|
} as any)
|
|
expect(actual).toEqual({
|
|
errorCode: "UNKNOWN",
|
|
})
|
|
})
|
|
})
|