Jest & Hooks : TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
问题 In create-react-app, I'm trying to simple test with jest but I'm getting this error : TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined. A part of my component AppBarUser.js /... const AppBarUser = () => { const classes = useStyles(); const [, formDispatch] = useContext(FormContext); const [t] = useContext(TranslationContext); const [openDrawer, setDrawer] = useState(false); const [userInfos, setData] = useState({}); useEffect(() => { const fetchData = async () => { try {