MCPcopy
hub / github.com/adobe/react-spectrum / renderTabs

Function renderTabs

packages/react-aria-components/test/Tabs.test.js:37–61  ·  view source on GitHub ↗
(tabsProps, tablistProps, tabProps, tabpanelProps)

Source from the content-addressed store, hash-verified

35import userEvent from '@testing-library/user-event';
36
37let renderTabs = (tabsProps, tablistProps, tabProps, tabpanelProps) =>
38 render(
39 <Tabs {...tabsProps} data-testid="tabs-wrapper">
40 <TabList {...tablistProps} aria-label="Test">
41 <Tab {...tabProps} id="a">
42 A
43 </Tab>
44 <Tab {...tabProps} id="b">
45 B
46 </Tab>
47 <Tab {...tabProps} id="c">
48 C
49 </Tab>
50 </TabList>
51 <TabPanel {...tabpanelProps} id="a">
52 A
53 </TabPanel>
54 <TabPanel {...tabpanelProps} id="b">
55 B
56 </TabPanel>
57 <TabPanel {...tabpanelProps} id="c">
58 C
59 </TabPanel>
60 </Tabs>
61 );
62
63describe('Tabs', () => {
64 let user;

Callers 1

Tabs.test.jsFile · 0.85

Calls 1

renderFunction · 0.50

Tested by

no test coverage detected