Skip to content

Commit

Permalink
test: (#63) 유저 정보 테스트 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilpop8663 committed Jul 20, 2023
1 parent ef01144 commit e78e6ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/__test__/api/user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ describe('서버와 통신하여 유저의 정보를 불러올 수 있어야 한

expect(data).toEqual(transformUserInfoResponse(MOCK_USER_INFO));
});

test('클라이언트에서 사용하는 유저 정보 API 명세가 [nickname, postCount, userPoint, userPoint, badge]으로 존재해야한다', async () => {
const data = await getUserInfo();

const userInfoKeys = Object.keys(data);

expect(userInfoKeys).toEqual(['nickname', 'postCount', 'userPoint', 'voteCount', 'badge']);
});
});

0 comments on commit e78e6ae

Please sign in to comment.