【发布时间】:2022-01-19 22:13:47
【问题描述】:
我需要帮助测试 Onclick 函数中的 API 调用
export function functionName (a, b, c){
const handleValue = async() =>{
axios.get(url, {method: 'post', body:{a: "a"}};
}
return <div>
{getvalue &&
<Button Onclick= {handleValue}>Button </Button>}
</div>
}
请帮助我了解如何执行此操作?
【问题讨论】:
标签: javascript reactjs typescript jestjs react-testing-library