Warning: An update to ExtractMLFeature 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 */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
in ExtractMLFeature (at ExtractMLFeature.test.tsx:100)
in Provider (created by WrapperComponent)
in WrapperComponent
테스팅 중 다음과 같은 warning이 발생하는 경우가 있습니다.
디버깅해보니
와 같이 임포트된 image를 호출하는 테스트 케이스에서 위 경고가 나타나는 것이 확인되었습니다.
이 경우 image가 있는 부분을
한 act로 감싸주면 문제가 해결됩니다.