We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a55a01 commit 8e64124Copy full SHA for 8e64124
tests/Focus.spec.tsx
@@ -292,12 +292,14 @@ describe('Focus', () => {
292
// ================ check click ==============
293
// click third item
294
const item2 = getByTestId('2');
295
+ const focusSpy2 = jest.spyOn(item2, 'focus').mockImplementation(() => {});
296
fireEvent.click(item2);
297
menuRef.current.focus();
298
// mock focus on item 2 to make sure it gets focused
- expect(focusSpy).toHaveBeenCalled();
299
+ expect(focusSpy2).toHaveBeenCalled();
300
// cleanup
301
focusSpy.mockRestore();
302
+ focusSpy2.mockRestore();
303
});
304
305
/* eslint-enable */
0 commit comments