i've been trying to test this component using jest but I've not been able to find a way around it.
function TestUseStateObject() {
const [state, setState] = React.useState(true);
const handleAdd = () => {
console.log('setting state');
setState(false)
}
console.log('state > ', state);
if(!state) {
return (<p>Testing</p>)
}
return (
<video src="https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4" autoPlay controls onEnded={() => handleAdd()} />
)
}