22 01 회고 - ChoDragon9/posts GitHub Wiki
업무 티켓 내용 작성
- User Story
- "As a [persona], I [want to], [so that]."
- https://www.atlassian.com/agile/project-management/user-stories
- Acceptance Criteria
userEvent.type
사용 후 act
사용 경고
에러 로그
console.error node_modules/react-dom/cjs/react-dom.development.js:88
Warning: An update to MyComponent inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
해결 방법
waitFor
사용.
await waitFor(() => expect().toBe());