MCPcopy Create free account
hub / github.com/react-component/select / mountSelect

Function mountSelect

tests/Field.test.tsx:21–41  ·  view source on GitHub ↗
(props?: Partial<SelectProps<any>>)

Source from the content-addressed store, hash-verified

19 const OPTION_2 = { bambooLabel: 'Little', bambooValue: 'little' };
20
21 function mountSelect(props?: Partial<SelectProps<any>>) {
22 return render(
23 <Select
24 open
25 options={
26 [
27 {
28 bambooLabel: 'Bamboo',
29 bambooChildren: [OPTION_1, OPTION_2],
30 },
31 ] as any
32 }
33 fieldNames={{
34 label: 'bambooLabel',
35 value: 'bambooValue',
36 options: 'bambooChildren',
37 }}
38 {...props}
39 />,
40 );
41 }
42
43 it('fieldNames should work', () => {
44 const onChange = jest.fn();

Callers 1

Field.test.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…