---
type: bookmarks
tags: ['mock', 'test']
status: release
ctime: 2022-04-09
mtime: 2024-03-22
---

테스트 코드에서 mock으로 처리하는 경우[^148-1]

- [Mocking React custom hook with Jest - Stack Overflow](https://stackoverflow.com/questions/65270255/mocking-react-custom-hook-with-jest)
- [mrbenhowl/mocking-firebase-initializeApp-and-firebase-auth-using-jest](https://github.com/mrbenhowl/mocking-firebase-initializeApp-and-firebase-auth-using-jest)
- [Avoid Nesting when you're Testing](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing)

---

[^148-1]: 그래서 내가 내린 결론은 저렇게 까지는 테스트할 필요가 없고 오히려 애매하게 결합된 컴포넌트들을 분리해서 관리하는게 맞을 것 같다는 생각을 해봤다.