Skip to content

Commit fb04117

Browse files
committed
refactor(tests): organize imports and enhance test structure
- Added missing imports for `afterEach`, `describe`, `expect`, `it`, and `vi` in various test files to ensure proper test execution and structure. - Cleaned up redundant import statements across multiple test files for better readability and maintainability. - Ensured consistent import style and order in test files to align with best practices.
1 parent 0b23f29 commit fb04117

File tree

273 files changed

+2148
-2226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+2148
-2226
lines changed

.prettierrc.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
const fabric = require('@umijs/fabric');
2-
31
module.exports = {
4-
...fabric.prettier,
2+
plugins: [
3+
require.resolve('prettier-plugin-organize-imports'),
4+
require.resolve('prettier-plugin-packagejson'),
5+
],
56
printWidth: 80,
6-
plugins: [require.resolve('prettier-plugin-organize-imports')],
7+
proseWrap: 'never',
8+
singleQuote: true,
9+
trailingComma: 'all',
10+
overrides: [
11+
{
12+
files: '*.md',
13+
options: {
14+
proseWrap: 'preserve',
15+
},
16+
},
17+
],
18+
endOfLine: 'lf',
719
};

README.es-PR.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ En esencia, ProComponents es una biblioteca de componentes de interfaz de usuari
9191
> - [Electron](https://www.electronjs.org/)
9292
9393
| [![edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![Edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![electron_48x48](https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png)](http://godban.github.io/browsers-support-badges/) |
94-
| --- | --- | --- | --- | --- |
95-
| Edge | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones |
94+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95+
| Edge | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones |
9696

9797
<br/>
9898

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ In essence, ProComponents is a robust, user-friendly, and versatile UI component
9191
> - [Electron](https://www.electronjs.org/)
9292
9393
| [![edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![Edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![electron_48x48](https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png)](http://godban.github.io/browsers-support-badges/) |
94-
| --- | --- | --- | --- | --- |
95-
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
94+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95+
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
9696

9797
<br/>
9898

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Pro Series 组件经过精心设计,以增强企业级应用程序的健壮架
9191
> - [Electron](https://www.electronjs.org/)
9292
9393
| [![edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![Edge](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)](http://godban.github.io/browsers-support-badges/) | [![electron_48x48](https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png)](http://godban.github.io/browsers-support-badges/) |
94-
| --- | --- | --- | --- | --- |
95-
| Edge | 最近 2 个版本 | 最近 2 个版本 | 最近 2 个版本 | 最近 2 个版本 |
94+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95+
| Edge | 最近 2 个版本 | 最近 2 个版本 | 最近 2 个版本 | 最近 2 个版本 |
9696

9797
<br/>
9898

demos/card/CheckCard/basic.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** Title: 基本使用 */
2-
32
import { CheckCard } from '@ant-design/pro-components';
43

54
export default () => (

demos/card/CheckCard/single.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* title: 单选模式
33
*/
4-
54
import { CheckCard } from '@ant-design/pro-components';
65

76
export default () => (

demos/descriptions/customization-value-type.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default () => {
102102
valueTypeMap: {
103103
link: {
104104
render: (text) => <a>{text}</a>,
105-
renderFormItem: (text, props) => (
105+
formItemRender: (text, props) => (
106106
<Input placeholder="请输入链接" {...props?.fieldProps} />
107107
),
108108
},
@@ -116,7 +116,7 @@ export default () => {
116116
</>
117117
);
118118
},
119-
renderFormItem: (text, props) => (
119+
formItemRender: (text, props) => (
120120
<TagList {...props} {...props?.fieldProps} />
121121
),
122122
},

demos/descriptions/editable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default () => {
5656
title: '状态2',
5757
key: 'state2',
5858
dataIndex: 'state2',
59-
renderFormItem: () => {
59+
formItemRender: () => {
6060
return <Input placeholder="输入 Success 切换分值" />;
6161
},
6262
},

demos/form/FieldSet/pro-form-captCha.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { ProForm, ProFormCaptcha } from '@ant-design/pro-components';
2-
31
import type { CaptFieldRef } from '@ant-design/pro-components';
2+
import { ProForm, ProFormCaptcha } from '@ant-design/pro-components';
43
import { Button, message } from 'antd';
54
import { useRef } from 'react';
65

demos/form/Group/customize.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* eslint-disable no-param-reassign */
2-
import {
1+
/* eslint-disable no-param-reassign */ import {
32
CopyOutlined,
43
DeleteOutlined,
54
HeartOutlined,

0 commit comments

Comments
 (0)