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

Function renderTabs

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

Source from the content-addressed store, hash-verified

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

Callers 1

Tabs.test.jsFile · 0.85

Calls 1

renderFunction · 0.50

Tested by

no test coverage detected