mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
chore: fix eslint errors (#43693)
* fix: fix master CI fail * fix: fix master CI fail * test: fix test case
This commit is contained in:
parent
d6fe1355a9
commit
c8b74859ca
@ -1,6 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import Avatar from '..';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import rtlTest from '../../../tests/shared/rtlTest';
|
||||
@ -140,14 +138,9 @@ describe('Avatar Render', () => {
|
||||
|
||||
Object.entries(sizes).forEach(([key, value]) => {
|
||||
it(`adjusts component size to ${value} when window size is ${key}`, () => {
|
||||
const wrapper = global.document.createElement('div');
|
||||
|
||||
(useBreakpoint as any).mockReturnValue({ [key]: true });
|
||||
act(() => {
|
||||
ReactDOM.render(<Avatar size={sizes} />, wrapper);
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
const { container } = render(<Avatar size={sizes} />);
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -401,7 +401,7 @@ describe('Calendar', () => {
|
||||
|
||||
for (let index = start; index < end; index += 1) {
|
||||
monthOptions.push(
|
||||
<Select.Option className="month-item" key={`${index}`} value={index}>
|
||||
<Select.Option className="month-item" key={index} value={index}>
|
||||
{months[index]}
|
||||
</Select.Option>,
|
||||
);
|
||||
|
@ -67,7 +67,7 @@ const Image: CompositionImage<ImageProps> = (props) => {
|
||||
|
||||
return wrapSSR(
|
||||
<RcImage
|
||||
prefixCls={`${prefixCls}`}
|
||||
prefixCls={prefixCls}
|
||||
preview={mergedPreview}
|
||||
rootClassName={mergedRootClassName}
|
||||
className={mergedClassName}
|
||||
|
Loading…
Reference in New Issue
Block a user