Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

컴포넌트 테스트에는 hook의 목 쓰기 #148

Open
atn832 opened this issue Apr 29, 2021 · 0 comments
Open

컴포넌트 테스트에는 hook의 목 쓰기 #148

atn832 opened this issue Apr 29, 2021 · 0 comments

Comments

@atn832
Copy link
Collaborator

atn832 commented Apr 29, 2021

예를 들면 저기서 firebase auth 목 쓰는게 대신에 useUser목 쓰면 나아:

((firebase.auth as unknown) as jest.Mock).mockReturnValue({

왜냐면 테스트 쓰면 의존성만 목 써야해. 지금 MatchDetail이 FirebaseAuth 쓰는게 아니라 useUser써. 그리고 useUser이 FirebaseAuth써. 그래서 MatchDetail 테스트 쓰려면 useUser못 써야해. 마찬가지 useUser테스트 쓰려면 FirebaseAuth 목 써야해.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant