Skip to content

Commit

Permalink
chore: update test utils
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jul 30, 2024
1 parent df7bd4f commit 9167b98
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/tests/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { SERVER_PORT } from 'service/envValues';

export const TEST_PORT = SERVER_PORT - 1;

export const GET = (api: { $path: () => string }): string => `GET: ${api.$path()}`;
export const GET = (api: { get: unknown; $path: () => string }): string => `GET: ${api.$path()}`;

export const POST = (api: { $path: () => string }): string => `POST: ${api.$path()}`;
export const POST = (api: { post: unknown; $path: () => string }): string => `POST: ${api.$path()}`;

export const PATCH = (api: { $path: () => string }): string => `PATCH: ${api.$path()}`;
export const PATCH = (api: { patch: unknown; $path: () => string }): string =>
`PATCH: ${api.$path()}`;

export const DELETE = (api: { $path: () => string }): string => `DELETE: ${api.$path()}`;
export const DELETE = (api: { delete: unknown; $path: () => string }): string =>
`DELETE: ${api.$path()}`;

export const WS = (type: (typeof WS_TYPES)[number]): string => `WS: ${type}`;

0 comments on commit 9167b98

Please sign in to comment.