How to select an input element with id in react jest?
Hi i am new to react and testing using jest. i want to select an input element with its id attribute.
Parameter in click() fireEvent
In Jest, I am using fireEvent.click()
. I want to pass the parameter of the function that will be called after I click that button for click event.
Parameter in click() fireEvent
In Jest, I am using fireEvent.click()
. I want to pass the parameter of the function that will be called after I click that button for click event.
(About jest) Guys, who knows what this test code does?
beforeEach(() => { mockAxios.post.mockImplementation((addres) => { if(addres == XXXX) { return Promise.resolve({res: XXXX}) } return Promise.reject(XXXX) }) }) I checked the relevant code and there does not seem tobe a trigger either reactjs jestjs New contributor cindy is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out […]