Skip to content

Commit

Permalink
refactor: typo fix HTTPMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
aaydin-tr committed Jul 11, 2024
1 parent 3d63015 commit 91135b0
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 186 deletions.
4 changes: 2 additions & 2 deletions __test__/helper.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { jest } from "bun:test";
import { Context } from "../src";
import { HttpMethod } from "../src/utils";
import { HTTPMethod } from "../src/utils";

export const createContextMock = (method: HttpMethod) => {
export const createContextMock = (method: HTTPMethod) => {
const statusMock = jest.fn();
const jsonMock = jest.fn();
const getResWithoutBodyMock = jest.fn();
Expand Down
18 changes: 9 additions & 9 deletions __test__/http-decorators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Options,
All,
} from "../src/decorators";
import { HttpMethod } from "../src/utils";
import { HTTPMethod } from "../src/utils";
import "reflect-metadata";

test("Get Decorator", () => {
Expand Down Expand Up @@ -100,7 +100,7 @@ test("Get Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.GET);
expect(route.method).toBe(HTTPMethod.GET);
}
});

Expand Down Expand Up @@ -188,7 +188,7 @@ test("Post Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.POST);
expect(route.method).toBe(HTTPMethod.POST);
}
});

Expand Down Expand Up @@ -276,7 +276,7 @@ test("Put Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.PUT);
expect(route.method).toBe(HTTPMethod.PUT);
}
});

Expand Down Expand Up @@ -364,7 +364,7 @@ test("Delete Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.DELETE);
expect(route.method).toBe(HTTPMethod.DELETE);
}
});

Expand Down Expand Up @@ -452,7 +452,7 @@ test("Head Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.HEAD);
expect(route.method).toBe(HTTPMethod.HEAD);
}
});

Expand Down Expand Up @@ -540,7 +540,7 @@ test("Patch Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.PATCH);
expect(route.method).toBe(HTTPMethod.PATCH);
}
});

Expand Down Expand Up @@ -628,7 +628,7 @@ test("Options Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.OPTIONS);
expect(route.method).toBe(HTTPMethod.OPTIONS);
}
});

Expand Down Expand Up @@ -716,6 +716,6 @@ test("All Decorator", () => {
expect(route.path).toBe(expected.path);
expect(route.fnName).toBe(expected.fnName);
expect(route.pathHasParams).toBe(expected.hasParams);
expect(route.method).toBe(HttpMethod.ALL);
expect(route.method).toBe(HTTPMethod.ALL);
}
});
Loading

0 comments on commit 91135b0

Please sign in to comment.