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

connect가 실행된 컴포넌트를 (enzyme) `mount`로 테스트한 경우 실패 케이스가 발생해서 찾아본 내용들 인 것 같은데 정확하게 기억이 안남. `shallow`로 변경했더니 이번에는 ref를 못쓰는 문제도 있었다고 하고...
여담이지만 컴포넌트를 명확하게 정의하고 분리해서 테스팅 스트레스를 줄이는 게 중요합니다.

- [Enzyme mount test failing with redux store state update](https://stackoverflow.com/questions/58010552/enzyme-mount-test-failing-with-redux-store-state-update)
- [httpsWhy I Always Use Shallow Rendering](https://hackernoon.com/why-i-always-use-shallow-rendering-a3a50da60942)