mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-13 13:15:32 +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();
|
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(() => {});
|
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||||
render(
|
render(
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
@ -194,8 +194,8 @@ describe('Breadcrumb', () => {
|
|||||||
);
|
);
|
||||||
errSpy.mockRestore();
|
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(() => {});
|
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||||
render(<Breadcrumb routes={[{ path: '/', breadcrumbName: 'Test' }]} />);
|
render(<Breadcrumb routes={[{ path: '/', breadcrumbName: 'Test' }]} />);
|
||||||
expect(errSpy).not.toHaveBeenCalled();
|
expect(errSpy).not.toHaveBeenCalled();
|
||||||
|
@ -14,7 +14,7 @@ jest.mock('../dropdown', () => {
|
|||||||
|
|
||||||
const MockedDropdown: React.FC<DropdownProps> & {
|
const MockedDropdown: React.FC<DropdownProps> & {
|
||||||
Button: typeof ActualDropdownComponent.Button;
|
Button: typeof ActualDropdownComponent.Button;
|
||||||
} = props => {
|
} = (props) => {
|
||||||
dropdownProps = props;
|
dropdownProps = props;
|
||||||
const { children, ...restProps } = props;
|
const { children, ...restProps } = props;
|
||||||
return h.createElement(ActualDropdownComponent, { ...restProps }, children);
|
return h.createElement(ActualDropdownComponent, { ...restProps }, children);
|
||||||
@ -131,7 +131,7 @@ describe('DropdownButton', () => {
|
|||||||
'ant-btn',
|
'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(() => {});
|
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||||
render(<DropdownButton overlay={<div>test</div>} />);
|
render(<DropdownButton overlay={<div>test</div>} />);
|
||||||
expect(errSpy).toHaveBeenCalledWith(
|
expect(errSpy).toHaveBeenCalledWith(
|
||||||
@ -139,7 +139,7 @@ describe('DropdownButton', () => {
|
|||||||
);
|
);
|
||||||
errSpy.mockRestore();
|
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(() => {});
|
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||||
render(<DropdownButton />);
|
render(<DropdownButton />);
|
||||||
expect(errSpy).not.toHaveBeenCalled();
|
expect(errSpy).not.toHaveBeenCalled();
|
||||||
|
Loading…
Reference in New Issue
Block a user