import React, { useState } from 'react'; import { SmileOutlined } from '@ant-design/icons'; import type { ConfigConsumerProps, RenderEmptyHandler } from '..'; import ConfigProvider, { ConfigContext } from '..'; import { resetWarned } from '../../_util/warning'; import mountTest from '../../../tests/shared/mountTest'; import { fireEvent, render } from '../../../tests/utils'; import Button from '../../button'; import Input from '../../input'; import Select from '../../select'; import Table from '../../table'; describe('ConfigProvider', () => { mountTest(() => (
)); it('autoInsertSpaceInButton', () => { const text = '确定'; const { container } = render( , ); expect(container.querySelector('span')?.innerHTML).toBe(text); }); it('renderEmpty', () => { const text = 'empty placeholder'; const { container } = render(
{text}
}> , ); expect(container.querySelector('.ant-table-placeholder')?.querySelector('div')?.innerHTML).toBe( text, ); }); it('nest prefixCls', () => { const { container } = render(