I need some ones help to write a unit test for this code. I have write a test case but its not working. I can't copy and past original so I have created dummy code and pasted it.
import {useState, useEffect} from 'React';
import {useNavigate} from 'react-router-dom';
import {useSelector} from 'react-redux';
const componentName=()=>{
const navigate = useNavigate();
const {loginRes} = useSelector((state).signUp)
const [data, setData] = useState()
I need some ones help to write a unit test for this code. I have write a test case but its not working. I can't copy and past original so I have created dummy code and pasted it.
import {useState, useEffect} from 'React'; import {useNavigate} from 'react-router-dom'; import {useSelector} from 'react-redux'; const componentName=()=>{ const navigate = useNavigate(); const {loginRes} = useSelector((state).signUp) const [data, setData] = useState()
} export default componentName;