Skip to content

Commit

Permalink
feat: delay default 파라메터로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BangDori committed May 10, 2024
1 parent 3d3577b commit 4c60141
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/mocks/dir/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import { HttpResponse, delay } from 'msw';

import { errorMessage } from '../consts/error';

/** 0 <= 응답 시간 <= 4초 */
const delayTime = Math.random() * 4001;

export async function createHttpSuccessResponse<T>(data: T) {
// await delay(delayTime);
await delay();

return HttpResponse.json(
{
Expand All @@ -18,7 +15,7 @@ export async function createHttpSuccessResponse<T>(data: T) {
}

export async function createHttpErrorResponse(code: keyof typeof errorMessage) {
// await delay(delayTime);
await delay();

return HttpResponse.json(
{
Expand Down

0 comments on commit 4c60141

Please sign in to comment.