Javascript – react test with useEffect, axios and useParams
... const MovieDetails = () => { ... let { movieId } = useParams(); const [movie, setMovie] = useState(null); useEffect(() => { // axios settings let unmounted = false; let source = axios.CancelToken.source(); axios.get(`http://localhost:4000/movies/${movieId}`, { cancelToken: source.token }).then(result => {…