mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
chore: fix typo (#38568)
This commit is contained in:
parent
d8a4c1ad04
commit
5ef12dfaa5
@ -182,7 +182,7 @@ describe('Breadcrumb', () => {
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should console Error then `overlay` in props', () => {
|
||||
it('should console Error when `overlay` in props', () => {
|
||||
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
render(
|
||||
<Breadcrumb>
|
||||
@ -194,8 +194,8 @@ describe('Breadcrumb', () => {
|
||||
);
|
||||
errSpy.mockRestore();
|
||||
});
|
||||
|
||||
it('should not console Error then `overlay` not in props', () => {
|
||||
|
||||
it('should not console Error when `overlay` not in props', () => {
|
||||
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
render(<Breadcrumb routes={[{ path: '/', breadcrumbName: 'Test' }]} />);
|
||||
expect(errSpy).not.toHaveBeenCalled();
|
||||
|
@ -14,7 +14,7 @@ jest.mock('../dropdown', () => {
|
||||
|
||||
const MockedDropdown: React.FC<DropdownProps> & {
|
||||
Button: typeof ActualDropdownComponent.Button;
|
||||
} = props => {
|
||||
} = (props) => {
|
||||
dropdownProps = props;
|
||||
const { children, ...restProps } = props;
|
||||
return h.createElement(ActualDropdownComponent, { ...restProps }, children);
|
||||
@ -131,7 +131,7 @@ describe('DropdownButton', () => {
|
||||
'ant-btn',
|
||||
);
|
||||
});
|
||||
it('should console Error then `overlay` in props', () => {
|
||||
it('should console Error when `overlay` in props', () => {
|
||||
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
render(<DropdownButton overlay={<div>test</div>} />);
|
||||
expect(errSpy).toHaveBeenCalledWith(
|
||||
@ -139,7 +139,7 @@ describe('DropdownButton', () => {
|
||||
);
|
||||
errSpy.mockRestore();
|
||||
});
|
||||
it('should not console Error then `overlay` not in props', () => {
|
||||
it('should not console Error when `overlay` not in props', () => {
|
||||
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
render(<DropdownButton />);
|
||||
expect(errSpy).not.toHaveBeenCalled();
|
||||
|
Loading…
Reference in New Issue
Block a user