Skip to content

Commit

Permalink
Fmt (#57)
Browse files Browse the repository at this point in the history
* fmt
  • Loading branch information
tomas-zijdemans-vipps authored Sep 4, 2024
1 parent 2b0c6a0 commit 125a7e8
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/api_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ export const proxifyFactory = <TFac extends RequestFactory>(
});
},
}) as unknown as ApiProxy<TFac>;
};
};
3 changes: 1 addition & 2 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type { SDKError } from "./types.ts";
* connection errors, forbidden status codes, and generic errors. It returns
* a standardized error object that can be used throughout the application.
*
*
* This function handles different types of errors, including retry errors,
* connection errors, forbidden status codes, and generic errors. It returns
* a standardized error object that can be used throughout the application.
Expand Down Expand Up @@ -67,4 +66,4 @@ export const parseError = <TErr>(

// Default to treating error as a string
return { ok: false, error: { message: String(error) } };
};
};
2 changes: 1 addition & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export const Client = (options: ClientConfig): SDKClient => {

// Proxify the base client with the API request factories
return proxifyClient(client);
};
};
2 changes: 1 addition & 1 deletion tests/agreement_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";
import { agreementRequestFactory } from "../src/apis/recurring.ts";

Deno.test("agreements - create - check correct url in TEST/MT", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/api_proxy_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { proxifyFactory } from "../src/api_proxy.ts";
import { baseClient } from "../src/base_client.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";
import type { RequestData } from "../src/types.ts";

Deno.test("proxifyFactory - Should return a Proxy object with method", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/auth_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";
import { authRequestFactory } from "../src/apis/auth.ts";

Deno.test("getToken - Should have correct url and header", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/base_client_helper_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../src/base_client_helper.ts";
import { uuid } from "../src/deps.ts";
import type { ClientConfig, RequestData } from "../src/types.ts";
import { assert, assertEquals } from "./test_deps.ts"
import { assert, assertEquals } from "./test_deps.ts";

Deno.test("buildRequest - Should return a Request object with the correct properties", () => {
const cfg: ClientConfig = {
Expand Down
4 changes: 2 additions & 2 deletions tests/base_client_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { baseClient } from "../src/base_client.ts";
import { assertEquals, mf } from "./test_deps.ts"
import { assertEquals, mf } from "./test_deps.ts";
import type { RequestData } from "../src/types.ts";
import { RetryError } from "../src/deps.ts";

Expand Down Expand Up @@ -166,4 +166,4 @@ Deno.test("makeRequest - Should catch Retry Errors", async () => {
const response = await client.makeRequest(requestData);
assertEquals(response.ok, false);
mf.reset();
});
});
2 changes: 1 addition & 1 deletion tests/charge_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "./test_deps.ts"
import { assert } from "./test_deps.ts";
import { chargeRequestFactory } from "../src/apis/recurring.ts";

Deno.test("create - should return the correct RequestData object", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/checkout_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
assertEquals,
assertExists,
assertNotEquals,
} from "./test_deps.ts"
} from "./test_deps.ts";

Deno.test("create - should return the correct request data", () => {
const client_id = "your_client_id";
Expand Down
2 changes: 1 addition & 1 deletion tests/epayment_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert, assertEquals, assertExists } from "./test_deps.ts"
import { assert, assertEquals, assertExists } from "./test_deps.ts";
import { ePaymentRequestFactory } from "../src/apis/epayment.ts";
import { uuid } from "../src/deps.ts";

Expand Down
2 changes: 1 addition & 1 deletion tests/error_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ Deno.test("parseError - Should return correct error message for Recurring Azure
};
const result = parseError(error);
assertEquals(result.ok, false);
});
});
2 changes: 1 addition & 1 deletion tests/fetch_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ Deno.test("getMediaType should return the parsed media type", () => {
});
const result = getMediaType(response);
assertEquals(result, "application/json");
});
});
2 changes: 1 addition & 1 deletion tests/login_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { loginRequestFactory } from "../src/apis/login.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";

Deno.test("login - discovery - should return the correct RequestData object", () => {
const requestData = loginRequestFactory.discovery();
Expand Down
2 changes: 1 addition & 1 deletion tests/mod_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";
import { Client } from "../src/mod.ts";

Deno.test("Client - available functions", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/ordermanagement_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { orderManagementRequestFactory } from "../src/apis/ordermanagement.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";

Deno.test("addCategory - should return the correct RequestData object", () => {
const body = {
Expand Down
2 changes: 1 addition & 1 deletion tests/qr_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
RedirectQrRequest,
RedirectQrUpdateRequest,
} from "../src/apis/types/qr_types.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";

Deno.test("redirectQR - create - should return a RequestData object with the correct properties", () => {
const token = "my-auth-token";
Expand Down
2 changes: 1 addition & 1 deletion tests/user_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { userRequestFactory } from "../src/apis/user.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";

Deno.test("userRequestFactory.info should return the correct RequestData object", () => {
const token = "your-token";
Expand Down
2 changes: 1 addition & 1 deletion tests/validate_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ClientConfig, RequestData } from "../src/types.ts";
import { validateRequestData } from "../src/validate.ts";
import { assertEquals } from "./test_deps.ts"
import { assertEquals } from "./test_deps.ts";

Deno.test("validateRequestData - Should return undefined for valid request data", () => {
const requestData: RequestData<unknown, unknown> = {
Expand Down
2 changes: 1 addition & 1 deletion tests/webhooks_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ Deno.test("webhooks - list webhooks - OK", async () => {
assertEquals(listResponse.ok, true);

mf.reset();
});
});

0 comments on commit 125a7e8

Please sign in to comment.