From e97a5684676e9936a4fc3e142d9bd3d024cbeca9 Mon Sep 17 00:00:00 2001 From: hmmhmmhm Date: Tue, 20 Oct 2026 12:12:05 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EC=98=AC=EB=A6=AC=EB=B8=8C=EC=98=81=20?= =?UTF-8?q?=EC=A0=9C=ED=95=9C=20=EC=8B=9C=EA=B0=84=20=EA=B2=80=EC=A6=9D?= =?UTF-8?q?=EC=9D=98=20=EC=8B=9C=EA=B3=84=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/api/oliveyoung-handlers.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/api/oliveyoung-handlers.test.ts b/tests/api/oliveyoung-handlers.test.ts index 406db3b3..4891b4e2 100644 --- a/tests/api/oliveyoung-handlers.test.ts +++ b/tests/api/oliveyoung-handlers.test.ts @@ -77,6 +77,7 @@ describe('handleOliveyoungFindStores', () => { }); it('timeoutMs 쿼리를 올리브영 매장 검색 요청에 전달한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch.mockResolvedValue( createMockDirectResponse({ @@ -92,6 +93,7 @@ describe('handleOliveyoungFindStores', () => { }); it('매장 검색 timeoutMs 쿼리가 유효하지 않으면 기본 제한 시간을 사용한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch.mockResolvedValue( createMockDirectResponse({ @@ -200,6 +202,7 @@ describe('handleOliveyoungSearchProducts', () => { }); it('timeoutMs 쿼리를 올리브영 상품 검색 요청에 전달한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch.mockResolvedValue( createMockDirectResponse({ @@ -215,6 +218,7 @@ describe('handleOliveyoungSearchProducts', () => { }); it('상품 검색 timeoutMs 쿼리가 0 이하이면 기본 제한 시간을 사용한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch.mockResolvedValue( createMockDirectResponse({ @@ -364,6 +368,7 @@ describe('handleOliveyoungCheckInventory', () => { }); it('timeoutMs 쿼리를 올리브영 재고 요청에 전달한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch .mockResolvedValueOnce( @@ -402,6 +407,7 @@ describe('handleOliveyoungCheckInventory', () => { }); it('timeoutMs 쿼리가 0 이하이면 기본 제한 시간을 사용한다', async () => { + vi.spyOn(Date, 'now').mockReturnValue(1700000000000); const timeoutSpy = vi.spyOn(globalThis, 'setTimeout'); mockFetch.mockRejectedValue(new Error('inventory fail'));