📜  如何检查回调是否触发 rtl - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:52.945000             🧑  作者: Mango

代码示例1
it('calls "onClick" prop on button click', () => {
  // Render new instance in every test to prevent leaking state
  const onClick = jest.fn();
  const { getByText } = render(