import React from 'react'; import Descriptions from '..'; import { render } from '../../../tests/utils'; import useBreakpoint from '../../grid/hooks/useBreakpoint'; import useItems from '../hooks/useItems'; describe('Descriptions.Hooks', () => { it('Should Descriptions not throw react key prop error in jsx mode', () => { const Demo = () => { const screens = useBreakpoint(); const items = useItems( screens, undefined, Bamboo , ); return

{(items[0] as any).key}

; }; const { container } = render(); expect(container.querySelector('p')?.textContent).toBe('bamboo'); }); });