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

Function findRoot

packages/react-aria-components/test/Switch.test.js:54–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53 let Switch = comp === 'SwitchField' ? SwitchExample : SwitchLegacy;
54 let findRoot = el =>
55 comp === 'SwitchField' ? el.closest('label').parentElement : el.closest('label');
56
57 it('should render a s with default class', () => {
58 let {getByRole} = render(<Switch>Test</Switch>);

Callers 1

Switch.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected