온라인 인증 시도와 처리 비용 및 Kakao 응답 경계를 제한한다

This commit is contained in:
2026-10-09 03:43:59 +09:00
parent 9dceaf8e4e
commit 3d9f7392df
12 changed files with 874 additions and 25 deletions
+11 -8
View File
@@ -25,11 +25,16 @@ describe('Kakao OAuth HTTP transport', () => {
await expect(createClient().signup('access-token')).resolves.toEqual({
alreadyRegistered: true,
});
expect(fetchMock).toHaveBeenCalledWith(new URL('https://kapi.example.test/v1/user/signup'), {
headers: {
Authorization: 'Bearer access-token',
},
});
expect(fetchMock).toHaveBeenCalledWith(
new URL('https://kapi.example.test/v1/user/signup'),
expect.objectContaining({
headers: {
Authorization: 'Bearer access-token',
},
redirect: 'error',
signal: expect.any(AbortSignal),
})
);
});
it('continues to reject unrelated Kakao signup errors', async () => {
@@ -40,8 +45,6 @@ describe('Kakao OAuth HTTP transport', () => {
})
);
await expect(createClient().signup('access-token')).rejects.toThrow(
'Kakao signup error: {"msg":"invalid request","code":-201}'
);
await expect(createClient().signup('access-token')).rejects.toThrow('Kakao signup error.');
});
});