MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Component

Function Component

packages/react-aria/test/interactions/Focusable.test.js:107–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 it('should error if component does not forward its ref', async function () {
106 using spy = jest.spyOn(console, 'error').mockImplementation(() => {});
107 let Component = () => <span role="button">Hi</span>;
108 render(
109 <Focusable>
110 <Component>Button</Component>
111 </Focusable>
112 );
113
114 expect(spy).toHaveBeenCalledWith('<Focusable> child must forward its ref to a DOM element.');
115 });

Callers

nothing calls this directly

Calls 1

renderFunction · 0.50

Tested by

no test coverage detected