Skip to content

Commit

Permalink
Small change in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelarrojo committed Dec 5, 2024
1 parent e9bd69b commit 5f7188e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/test/hal-api-caller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("Apicaller functions test", () => {
mockAxios.restore();
});

it("should make a successful OPTIONS request and return HalResponse", async () => {
it("Should make a successful OPTIONS request and return HalResponse", async () => {
const url = "https://example.com";
const headers = { CustomHeader: "CustomValue" };
const responseData = optionsResponse;
Expand All @@ -30,7 +30,7 @@ describe("Apicaller functions test", () => {
expect(result.halResource.getTitle()).toEqual("Options available on Quote ID");
});

it("should make a successful GET request and return HalResponse", async () => {
it("Should make a successful GET request and return HalResponse", async () => {
const url = "https://example.com";
const headers = { CustomHeader: "CustomValue" };
const responseData = getResponse;
Expand All @@ -45,7 +45,7 @@ describe("Apicaller functions test", () => {
expect(result.halResource.getItems().length).toBe(10);
});

it("should make a successful PATCH request", async () => {
it("Should make a successful PATCH request", async () => {
const url = "https://example.com";
const body = { data: "updatedData" };
const headers = { CustomHeader: "CustomValue" };
Expand All @@ -61,7 +61,7 @@ describe("Apicaller functions test", () => {
expect(result.body).toEqual(responseData);
});

it("should handle PATCH request failure", async () => {
it("Should handle PATCH request failure", async () => {
const url = "https://example.com";
const body = { data: "updatedData" };
const headers = { CustomHeader: "CustomValue" };
Expand All @@ -71,7 +71,7 @@ describe("Apicaller functions test", () => {
await expect(apicaller.patch({ url, body, headers })).rejects.toThrow("Request failed with status code 500");
});

it("should make a successful POST request", async () => {
it("Should make a successful POST request", async () => {
const url = "https://example.com";
const body = { name: "New Resource" };
const headers = { CustomHeader: "CustomValue" };
Expand All @@ -87,7 +87,7 @@ describe("Apicaller functions test", () => {
expect(result.body).toEqual(responseData);
});

it("should handle POST request failure", async () => {
it("Should handle POST request failure", async () => {
const url = "https://example.com";
const body = { name: "New Resource" };
const headers = { CustomHeader: "CustomValue" };
Expand All @@ -97,7 +97,7 @@ describe("Apicaller functions test", () => {
await expect(apicaller.post({ url, body, headers })).rejects.toThrow("Request failed with status code 404");
});

it("should make a successful PUT request", async () => {
it("Should make a successful PUT request", async () => {
const url = "https://example.com";
const body = { name: "Updated Resource" };
const headers = { CustomHeader: "CustomValue" };
Expand All @@ -113,7 +113,7 @@ describe("Apicaller functions test", () => {
expect(result.body).toEqual(responseData);
});

it("should make a successful DELETE request", async () => {
it("Should make a successful DELETE request", async () => {
const url = "https://example.com";
const headers = { CustomHeader: "CustomValue" };
const responseData = { success: true };
Expand All @@ -128,7 +128,7 @@ describe("Apicaller functions test", () => {
expect(result.body).toEqual(responseData);
});

it("should handle DELETE request failure", async () => {
it("Should handle DELETE request failure", async () => {
const url = "https://example.com";
const headers = { CustomHeader: "CustomValue" };

Expand All @@ -137,7 +137,7 @@ describe("Apicaller functions test", () => {
await expect(apicaller.del({ url, headers })).rejects.toThrow("Request failed with status code 403");
});

it("should handle OPTIONS request failure", async () => {
it("Should handle OPTIONS request failure", async () => {
const url = "https://example.com";
const headers = { CustomHeader: "CustomValue" };

Expand Down

0 comments on commit 5f7188e

Please sign in to comment.