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

Function findRoot

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

Source from the content-addressed store, hash-verified

52
53 let Checkbox = comp === 'CheckboxField' ? CheckboxExample : CheckboxLegacy;
54 let findRoot = el =>
55 comp === 'CheckboxField' ? el.closest('label').parentElement : el.closest('label');
56
57 it('should render a checkbox with default class', () => {
58 let {getByRole} = render(<Checkbox>Test</Checkbox>);

Callers 1

Checkbox.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected