Debian Codegraph @

packages/antd/test/Array.test.tsx

raw
1 import { arrayTests, CHECKBOXES_CUSTOMIZE } from '@rjsf/snapshot-tests';
2
3 import '../__mocks__/matchMedia.mock';
4 import Form from '../src';
5
6 arrayTests(Form, {
7 [CHECKBOXES_CUSTOMIZE]: {
8 createNodeMock: (element) => {
9 if (element.type === 'span' && element.props['aria-hidden']) {
10 // the `rc-select` MultipleSelector code expects a ref for this span to exist, so use the feature of
11 // react-test-renderer to create one
12 // See: https://reactjs.org/docs/test-renderer.html#ideas
13 return { scrollWidth: 100 };
14 }
15 return null;
16 },
17 },
18 });