Skip to content

Commit a87b6c4

Browse files
committed
Update test (exception includes details of the error)
1 parent f4bd90a commit a87b6c4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/__tests__/httpClient.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe("HTTP Client", function (): void {
5858
${"MOCKED_API_KEY"} | ${"TEST"} | ${true} | ${["some_error"]} | ${"ApiException"} | ${""} | ${"some_error"}
5959
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, { status: 401, message: "Invalid Request", errorCode: "171", errorType: "validationError"}]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null: Invalid Request"}
6060
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, {}]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null"}
61-
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, "fail"]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null"}
61+
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, "fail"]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. Error parsing response: Unexpected token 'i', \"fail\" is not valid JSON"}
6262
`("Should return $errorType, $contains, $equals", async ({ apiKey, environment, withError, args, errorType, contains, equals }) => {
6363
await getResponse({ apiKey, environment }, (scope) => {
6464
if (withError) scope.replyWithError(args[0]);
@@ -102,8 +102,6 @@ describe("HTTP Client", function (): void {
102102
const requestOptions = { headers: { foo : "bar" }};
103103
const response = await binLookupService.BinLookupApi.get3dsAvailability(threeDSAvailabilityRequest, requestOptions);
104104
expect(response).toEqual< binlookup.ThreeDSAvailabilityResponse>(threeDSAvailabilitySuccessResponse);
105-
106-
console.log("requestOptions", requestOptions);
107105
});
108106

109107
test("should add default applicationInfo to the headers", async (): Promise<void> => {

0 commit comments

Comments
 (0)