📅  最后修改于: 2022-03-11 14:57:39.036000             🧑  作者: Mango
const spyFunction = jest.spyOn(helpers, "functionbeingspiedon");
fireEvent.keyDown(container.getByText('text from element'), {
key: "Escape",
code: "Escape",
keyCode: 27,
charCode: 27
});
expect(spyFunction).toBeCalledWith('called parameters');