diff --git a/.eslintrc.js b/.eslintrc.js
index c9ea7f852..f81e8adb9 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -38,6 +38,13 @@ module.exports = {
plugins: ['@typescript-eslint', 'prettier', 'import'],
// add your custom rules here
rules: {
+ 'import/order': ['error', {
+ groups: [
+ 'builtin', // Built-in types are first
+ 'external', // Then the index file
+ 'internal',
+ ]
+ }],
// 非开发模式禁用debugger
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
// 允许调用首字母大写的函数时没有 new 操作符
diff --git a/package.json b/package.json
index 2014dab6c..6e3bdc623 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
"cover": "jest --coverage",
"test": "jest && jest -c jest.e2e.config.js",
"test:snap-update": "npm run test:unit -- -u",
- "test:demo": "node gen-demo-test.js",
+ "test:demo": "node script/gen-demo-test.js",
"test:unit": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
"badge": "node script/coverage-badge.js",
diff --git a/gen-demo-test.js b/script/gen-demo-test.js
similarity index 94%
rename from gen-demo-test.js
rename to script/gen-demo-test.js
index 3ecfa9a49..044364837 100644
--- a/gen-demo-test.js
+++ b/script/gen-demo-test.js
@@ -12,9 +12,9 @@ const upperFirst = require('lodash/upperFirst');
// };
const CONFIG = {
- sourcePath: path.resolve(__dirname, 'src'),
- targetPath: path.resolve(__dirname, 'src'),
- defaultTemplate: ['import simulate from \'miniprogram-simulate\';', 'import path from \'path\';'].join('\n'),
+ sourcePath: path.resolve(__dirname, '../src'),
+ targetPath: path.resolve(__dirname, '../src'),
+ defaultTemplate: ["import path from 'path';", "import simulate from 'miniprogram-simulate';"].join('\n'),
};
/*
@@ -115,7 +115,7 @@ function main() {
outputOneComponentTestFile(componentFolder, demoFiles);
}
});
- }
+ };
files.forEach(generation);
}
});
diff --git a/src/action-sheet/__test__/demo.test.js b/src/action-sheet/__test__/demo.test.js
index 21b832fb1..d5fc03963 100644
--- a/src/action-sheet/__test__/demo.test.js
+++ b/src/action-sheet/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['align', 'grid', 'list', 'status'];
diff --git a/src/action-sheet/__test__/index.test.js b/src/action-sheet/__test__/index.test.js
index fc9748c0a..a1d9ed747 100644
--- a/src/action-sheet/__test__/index.test.js
+++ b/src/action-sheet/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import * as Util from '../../common/utils';
import { show, close } from '../show';
diff --git a/src/avatar/__test__/demo.test.js b/src/avatar/__test__/demo.test.js
index 61d0931f4..7da9947b4 100644
--- a/src/avatar/__test__/demo.test.js
+++ b/src/avatar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['action', 'badge-avatar', 'character-avatar', 'exhibition', 'icon-avatar', 'image-avatar', 'size'];
diff --git a/src/avatar/__test__/index.test.js b/src/avatar/__test__/index.test.js
index 17ab8af9d..0f50ed8a7 100644
--- a/src/avatar/__test__/index.test.js
+++ b/src/avatar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('Avatar & Avatar Groups', () => {
const id = load(path.resolve(__dirname, './index'));
diff --git a/src/back-top/__test__/demo.test.js b/src/back-top/__test__/demo.test.js
index 162d97d77..7ebbd1ad6 100644
--- a/src/back-top/__test__/demo.test.js
+++ b/src/back-top/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'half-round'];
diff --git a/src/back-top/__test__/index.test.js b/src/back-top/__test__/index.test.js
index c0cbac0c6..c73d7a727 100644
--- a/src/back-top/__test__/index.test.js
+++ b/src/back-top/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('back-top', () => {
// 加载 back-top 组件
diff --git a/src/badge/__test__/demo.test.js b/src/badge/__test__/demo.test.js
index fa837aed6..3da71a7bf 100644
--- a/src/badge/__test__/demo.test.js
+++ b/src/badge/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'size', 'theme'];
diff --git a/src/badge/__test__/index.test.js b/src/badge/__test__/index.test.js
index 4698322db..57a145a67 100644
--- a/src/badge/__test__/index.test.js
+++ b/src/badge/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import { hex2Rgb } from '../../../test/utils/colors';
const shapes = ['circle', 'square', 'round', 'ribbon'];
diff --git a/src/button/__test__/demo.test.js b/src/button/__test__/demo.test.js
index 175c92c1a..b2273586a 100644
--- a/src/button/__test__/demo.test.js
+++ b/src/button/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'block-btn', 'disabled', 'ghost-btn', 'group-btn', 'icon-btn', 'shape', 'size', 'theme'];
diff --git a/src/button/__test__/index.test.js b/src/button/__test__/index.test.js
index 44dbd15b8..57c4ec9ba 100644
--- a/src/button/__test__/index.test.js
+++ b/src/button/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('button', () => {
const button = load(path.resolve(__dirname, '../button'));
diff --git a/src/calendar/__test__/demo.test.js b/src/calendar/__test__/demo.test.js
index 2150d554f..c0527ed4c 100644
--- a/src/calendar/__test__/demo.test.js
+++ b/src/calendar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom-button', 'custom-range', 'custom-text', 'multiple', 'range', 'without-popup'];
diff --git a/src/calendar/__test__/index.test.js b/src/calendar/__test__/index.test.js
index cafeeff9b..0a4529914 100644
--- a/src/calendar/__test__/index.test.js
+++ b/src/calendar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('calendar', () => {
const calendar = load(path.resolve(__dirname, `../calendar`), 't-calendar');
diff --git a/src/cascader/__test__/demo.test.js b/src/cascader/__test__/demo.test.js
index f272d618a..7e644f11f 100644
--- a/src/cascader/__test__/demo.test.js
+++ b/src/cascader/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'keys', 'theme-tab', 'with-title', 'with-value'];
diff --git a/src/cascader/__test__/index.test.js b/src/cascader/__test__/index.test.js
index 525550005..773db4817 100644
--- a/src/cascader/__test__/index.test.js
+++ b/src/cascader/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('cascader', () => {
const cascader = load(path.resolve(__dirname, `../cascader`));
diff --git a/src/cell/__test__/demo.test.js b/src/cell/__test__/demo.test.js
index 802e3af5c..e97fadf90 100644
--- a/src/cell/__test__/demo.test.js
+++ b/src/cell/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'multiple', 'theme'];
diff --git a/src/cell/__test__/index.test.js b/src/cell/__test__/index.test.js
index 977db369b..c45013689 100644
--- a/src/cell/__test__/index.test.js
+++ b/src/cell/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('cell', () => {
const cell = load(path.resolve(__dirname, `../cell`));
diff --git a/src/checkbox/__test__/demo.test.js b/src/checkbox/__test__/demo.test.js
index c770faf53..f52f1bf24 100644
--- a/src/checkbox/__test__/demo.test.js
+++ b/src/checkbox/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['all', 'base', 'card', 'horizontal', 'right', 'special', 'status', 'type'];
diff --git a/src/checkbox/__test__/index.test.js b/src/checkbox/__test__/index.test.js
index 4f859b023..0a0950ce6 100644
--- a/src/checkbox/__test__/index.test.js
+++ b/src/checkbox/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('Checkbox', () => {
const id = load(path.resolve(__dirname, './index'));
diff --git a/src/col/__test__/__snapshots__/demo.test.js.snap b/src/col/__test__/__snapshots__/demo.test.js.snap
new file mode 100644
index 000000000..d00a114a6
--- /dev/null
+++ b/src/col/__test__/__snapshots__/demo.test.js.snap
@@ -0,0 +1,77 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Col Col base demo works fine 1`] = `
+
+
+
+ col-8
+
+
+ col-8
+
+
+ col-8
+
+
+
+
+ col-4
+
+
+ col-16 col-offset-4
+
+
+
+
+ col-12 col-offset-12
+
+
+
+`;
+
+exports[`Col Col offset demo works fine 1`] = `
+
+
+
+ col-8
+
+
+ col-8
+
+
+ col-8
+
+
+
+`;
diff --git a/src/col/__test__/demo.test.js b/src/col/__test__/demo.test.js
new file mode 100644
index 000000000..186d22511
--- /dev/null
+++ b/src/col/__test__/demo.test.js
@@ -0,0 +1,19 @@
+/**
+ * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
+ */
+
+import path from 'path';
+import simulate from 'miniprogram-simulate';
+
+const mapper = ['base', 'offset'];
+
+describe('Col', () => {
+ mapper.forEach((demoName) => {
+ it(`Col ${demoName} demo works fine`, () => {
+ const id = load(path.resolve(__dirname, `../../col/_example/${demoName}/index`), demoName);
+ const container = simulate.render(id);
+ container.attach(document.createElement('parent-wrapper'));
+ expect(container.toJSON()).toMatchSnapshot();
+ });
+ });
+});
diff --git a/src/collapse/__test__/demo.test.js b/src/collapse/__test__/demo.test.js
index 7a2e4f7fc..fdfc45d33 100644
--- a/src/collapse/__test__/demo.test.js
+++ b/src/collapse/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['accordion', 'action', 'base', 'placement', 'theme'];
diff --git a/src/collapse/__test__/index.test.js b/src/collapse/__test__/index.test.js
index 4effcc18e..c0d87dc1c 100644
--- a/src/collapse/__test__/index.test.js
+++ b/src/collapse/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('collapse', () => {
const id = load(path.resolve(__dirname, `./index`));
diff --git a/src/count-down/__test__/demo.test.js b/src/count-down/__test__/demo.test.js
index 1a3ced6f1..cc06b42af 100644
--- a/src/count-down/__test__/demo.test.js
+++ b/src/count-down/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'size'];
diff --git a/src/count-down/__test__/index.test.js b/src/count-down/__test__/index.test.js
index 372ba9a74..d721e5d55 100644
--- a/src/count-down/__test__/index.test.js
+++ b/src/count-down/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('countdown', () => {
const countdown = load(path.resolve(__dirname, `../count-down`), 't-count-down');
diff --git a/src/date-time-picker/__test__/demo.test.js b/src/date-time-picker/__test__/demo.test.js
index 2c78c963b..ac5270706 100644
--- a/src/date-time-picker/__test__/demo.test.js
+++ b/src/date-time-picker/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['date-all', 'steps', 'time', 'year-month', 'year-month-date'];
diff --git a/src/date-time-picker/__test__/index.test.js b/src/date-time-picker/__test__/index.test.js
index 250493f07..e111d7cea 100644
--- a/src/date-time-picker/__test__/index.test.js
+++ b/src/date-time-picker/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('date-time-picker', () => {
const id = load(path.resolve(__dirname, `./index`));
diff --git a/src/date-time-picker/date-time-picker.ts b/src/date-time-picker/date-time-picker.ts
index 48a344aad..2c66caeb8 100644
--- a/src/date-time-picker/date-time-picker.ts
+++ b/src/date-time-picker/date-time-picker.ts
@@ -1,5 +1,5 @@
-import dayjs from 'dayjs';
import type { Dayjs } from 'dayjs';
+import dayjs from 'dayjs';
import config from '../common/config';
import { SuperComponent, wxComponent } from '../common/src/index';
import defaultLocale from './locale/zh';
diff --git a/src/dialog/__test__/demo.test.js b/src/dialog/__test__/demo.test.js
index 3eb1b62cb..c59422f3d 100644
--- a/src/dialog/__test__/demo.test.js
+++ b/src/dialog/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'button', 'command', 'confirm', 'status', 'with-image', 'with-input'];
diff --git a/src/dialog/__test__/index.test.js b/src/dialog/__test__/index.test.js
index 2a1488d16..588304c37 100644
--- a/src/dialog/__test__/index.test.js
+++ b/src/dialog/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import Dialog from '../index';
import * as Util from '../../common/utils';
diff --git a/src/divider/__test__/demo.test.js b/src/divider/__test__/demo.test.js
index ab5f17781..d982e3271 100644
--- a/src/divider/__test__/demo.test.js
+++ b/src/divider/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'theme'];
diff --git a/src/divider/__test__/index.test.js b/src/divider/__test__/index.test.js
index ca18daa15..cc22bd51f 100644
--- a/src/divider/__test__/index.test.js
+++ b/src/divider/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
// 文本位置
const textAlign = ['left', 'center', 'right'];
diff --git a/src/drawer/__test__/demo.test.js b/src/drawer/__test__/demo.test.js
index ff1a9ecc0..9506a6337 100644
--- a/src/drawer/__test__/demo.test.js
+++ b/src/drawer/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'footer', 'icon-drawer', 'title'];
diff --git a/src/drawer/__test__/index.test.js b/src/drawer/__test__/index.test.js
index 9884b6698..3718db24a 100644
--- a/src/drawer/__test__/index.test.js
+++ b/src/drawer/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('drawer', () => {
const drawer = load(path.resolve(__dirname, `../drawer`), 't-drawer');
diff --git a/src/dropdown-menu/__test__/demo.test.js b/src/dropdown-menu/__test__/demo.test.js
index 4d6f9b2fc..cccea7b7b 100644
--- a/src/dropdown-menu/__test__/demo.test.js
+++ b/src/dropdown-menu/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['multi', 'single', 'tree'];
diff --git a/src/dropdown-menu/__test__/index.test.js b/src/dropdown-menu/__test__/index.test.js
index 4cc90a92a..b2424fd33 100644
--- a/src/dropdown-menu/__test__/index.test.js
+++ b/src/dropdown-menu/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('dropdown-menu', () => {
const id = load(path.resolve(__dirname, `./index`));
diff --git a/src/empty/__test__/demo.test.js b/src/empty/__test__/demo.test.js
index 839ead0a9..cc8d3f928 100644
--- a/src/empty/__test__/demo.test.js
+++ b/src/empty/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'buttonEmpty', 'imageEmpty'];
diff --git a/src/empty/__test__/index.test.js b/src/empty/__test__/index.test.js
index b6d105cff..e1ffe7990 100644
--- a/src/empty/__test__/index.test.js
+++ b/src/empty/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('empty', () => {
const empty = load(path.resolve(__dirname, `../empty`));
diff --git a/src/fab/__test__/demo.test.js b/src/fab/__test__/demo.test.js
index 997860d21..22966d52a 100644
--- a/src/fab/__test__/demo.test.js
+++ b/src/fab/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['advance', 'base'];
diff --git a/src/fab/__test__/index.test.js b/src/fab/__test__/index.test.js
index 6643ace77..da59dd39d 100644
--- a/src/fab/__test__/index.test.js
+++ b/src/fab/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('fab', () => {
const fab = load(path.resolve(__dirname, `../fab`), 't-fab');
diff --git a/src/footer/__test__/demo.test.js b/src/footer/__test__/demo.test.js
index 5e82c89f0..a1dc8c924 100644
--- a/src/footer/__test__/demo.test.js
+++ b/src/footer/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'link', 'logo'];
diff --git a/src/footer/__test__/index.test.js b/src/footer/__test__/index.test.js
index b67af548e..9608902a0 100644
--- a/src/footer/__test__/index.test.js
+++ b/src/footer/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('Footer', () => {
const footer = load(path.resolve(__dirname, `../footer`));
diff --git a/src/grid/__test__/demo.test.js b/src/grid/__test__/demo.test.js
index a7231f74d..bc392cab4 100644
--- a/src/grid/__test__/demo.test.js
+++ b/src/grid/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['badge', 'base', 'border', 'card', 'description', 'icon-grid', 'multiple', 'scroll'];
diff --git a/src/grid/__test__/index.test.js b/src/grid/__test__/index.test.js
index 6c55f8eac..2a7267dc7 100644
--- a/src/grid/__test__/index.test.js
+++ b/src/grid/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('grid', () => {
const id = load(path.resolve(__dirname, './index'));
diff --git a/src/icon/__test__/demo.test.js b/src/icon/__test__/demo.test.js
index e0545f9a7..242fb075e 100644
--- a/src/icon/__test__/demo.test.js
+++ b/src/icon/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom', 'iconImage'];
diff --git a/src/icon/__test__/index.test.js b/src/icon/__test__/index.test.js
index 09e875f64..027f5564c 100644
--- a/src/icon/__test__/index.test.js
+++ b/src/icon/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('icon', () => {
const icon = load(path.resolve(__dirname, `../icon`));
diff --git a/src/image-viewer/__test__/demo.test.js b/src/image-viewer/__test__/demo.test.js
index 5354976d1..8524e5aa4 100644
--- a/src/image-viewer/__test__/demo.test.js
+++ b/src/image-viewer/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'delete'];
diff --git a/src/image-viewer/__test__/index.test.js b/src/image-viewer/__test__/index.test.js
index fb7324808..305a7be48 100644
--- a/src/image-viewer/__test__/index.test.js
+++ b/src/image-viewer/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('image-viewer', () => {
const imageViewer = load(path.resolve(__dirname, `../image-viewer`), 't-image-viewer');
diff --git a/src/image/__test__/demo.test.js b/src/image/__test__/demo.test.js
index 73406d121..46960aa72 100644
--- a/src/image/__test__/demo.test.js
+++ b/src/image/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'size', 'status'];
diff --git a/src/image/__test__/index.test.js b/src/image/__test__/index.test.js
index 7e45512c0..1613c676c 100644
--- a/src/image/__test__/index.test.js
+++ b/src/image/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('image', () => {
const image = load(path.resolve(__dirname, `../image`), 't-image');
diff --git a/src/indexes/__test__/demo.test.js b/src/indexes/__test__/demo.test.js
index 8591208bf..802454a4f 100644
--- a/src/indexes/__test__/demo.test.js
+++ b/src/indexes/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom'];
diff --git a/src/indexes/__test__/index.test.js b/src/indexes/__test__/index.test.js
index a0a9911ab..7d85786db 100644
--- a/src/indexes/__test__/index.test.js
+++ b/src/indexes/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import * as Util from '../../common/utils';
beforeAll(() => {
diff --git a/src/input/__test__/demo.test.js b/src/input/__test__/demo.test.js
index 3fcfc84aa..603f344e8 100644
--- a/src/input/__test__/demo.test.js
+++ b/src/input/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = [
'align',
diff --git a/src/input/__test__/index.test.js b/src/input/__test__/index.test.js
index 8477a6091..7732bb5ae 100644
--- a/src/input/__test__/index.test.js
+++ b/src/input/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('input', () => {
const input = load(path.resolve(__dirname, `../input`), 't-input');
diff --git a/src/link/__test__/demo.test.js b/src/link/__test__/demo.test.js
index a4d25a655..2d80e3270 100644
--- a/src/link/__test__/demo.test.js
+++ b/src/link/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['content', 'disabled', 'prefix', 'size', 'suffix', 'theme', 'underline'];
diff --git a/src/link/__test__/index.test.js b/src/link/__test__/index.test.js
index 8426ad09d..79ac4c812 100644
--- a/src/link/__test__/index.test.js
+++ b/src/link/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('link', () => {
const link = load(path.resolve(__dirname, `../link`));
diff --git a/src/loading/__test__/demo.test.js b/src/loading/__test__/demo.test.js
index 60a8118fc..9f1ed6186 100644
--- a/src/loading/__test__/demo.test.js
+++ b/src/loading/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'duration', 'horizontal', 'size', 'status', 'text', 'vertical'];
diff --git a/src/loading/__test__/index.test.js b/src/loading/__test__/index.test.js
index 86abe504e..1db4cf684 100644
--- a/src/loading/__test__/index.test.js
+++ b/src/loading/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('loading', () => {
const loading = load(path.resolve(__dirname, `../loading`));
diff --git a/src/message/__test__/demo.test.js b/src/message/__test__/demo.test.js
index 5a23eb72a..c7c92f49d 100644
--- a/src/message/__test__/demo.test.js
+++ b/src/message/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'theme'];
diff --git a/src/message/__test__/index.test.js b/src/message/__test__/index.test.js
index 4299fa21e..4d1e00962 100644
--- a/src/message/__test__/index.test.js
+++ b/src/message/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import Message from '../index';
import * as Util from '../../common/utils';
diff --git a/src/navbar/__test__/demo.test.js b/src/navbar/__test__/demo.test.js
index 1c8d79e99..49925ccf9 100644
--- a/src/navbar/__test__/demo.test.js
+++ b/src/navbar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['back-home', 'base', 'custom-color', 'img', 'left-title', 'search'];
diff --git a/src/navbar/__test__/index.test.js b/src/navbar/__test__/index.test.js
index 2353afe5c..44525efb6 100644
--- a/src/navbar/__test__/index.test.js
+++ b/src/navbar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('navbar', () => {
const navbar = load(path.resolve(__dirname, `../navbar`), 't-navbar');
diff --git a/src/notice-bar/__test__/demo.test.js b/src/notice-bar/__test__/demo.test.js
index 59a80c233..d9cd5144b 100644
--- a/src/notice-bar/__test__/demo.test.js
+++ b/src/notice-bar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom', 'customization', 'event', 'iconDemo', 'scrolling', 'suffixIcon', 'theme'];
diff --git a/src/notice-bar/__test__/index.test.js b/src/notice-bar/__test__/index.test.js
index f9e8a1935..aed263ce7 100644
--- a/src/notice-bar/__test__/index.test.js
+++ b/src/notice-bar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import similateApi from 'miniprogram-simulate/src/api';
import * as Util from '../../common/utils';
diff --git a/src/overlay/__test__/demo.test.js b/src/overlay/__test__/demo.test.js
index 7c6f64eea..c39029ea4 100644
--- a/src/overlay/__test__/demo.test.js
+++ b/src/overlay/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base'];
diff --git a/src/overlay/__test__/index.test.js b/src/overlay/__test__/index.test.js
index 4e2975ff2..ab0b0db37 100644
--- a/src/overlay/__test__/index.test.js
+++ b/src/overlay/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('overlay', () => {
const overlay = load(path.resolve(__dirname, `../overlay`), 't-overlay');
diff --git a/src/picker/__test__/demo.test.js b/src/picker/__test__/demo.test.js
index 3052f6fc2..4327cc11f 100644
--- a/src/picker/__test__/demo.test.js
+++ b/src/picker/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['area', 'base', 'with-title'];
diff --git a/src/picker/__test__/index.test.js b/src/picker/__test__/index.test.js
index fb20511fa..87f18a757 100644
--- a/src/picker/__test__/index.test.js
+++ b/src/picker/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('picker', () => {
const id = load(path.resolve(__dirname, `./index`));
diff --git a/src/popup/__test__/demo.test.js b/src/popup/__test__/demo.test.js
index b1a326b68..8717fa7d5 100644
--- a/src/popup/__test__/demo.test.js
+++ b/src/popup/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom-close', 'with-title'];
diff --git a/src/progress/__test__/demo.test.js b/src/progress/__test__/demo.test.js
index 04b23567f..57fa32b9b 100644
--- a/src/progress/__test__/demo.test.js
+++ b/src/progress/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'circle', 'custom', 'line', 'plump', 'transition'];
diff --git a/src/progress/__test__/index.test.js b/src/progress/__test__/index.test.js
index 350135a6e..059ed89c6 100644
--- a/src/progress/__test__/index.test.js
+++ b/src/progress/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('progress', () => {
const progress = load(path.resolve(__dirname, `../progress`));
diff --git a/src/pull-down-refresh/__test__/demo.test.js b/src/pull-down-refresh/__test__/demo.test.js
index d8b85771e..f531cc803 100644
--- a/src/pull-down-refresh/__test__/demo.test.js
+++ b/src/pull-down-refresh/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base'];
diff --git a/src/pull-down-refresh/__test__/index.test.js b/src/pull-down-refresh/__test__/index.test.js
index 8bfcdc9de..d5431db17 100644
--- a/src/pull-down-refresh/__test__/index.test.js
+++ b/src/pull-down-refresh/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('pull-down-refresh', () => {
const pullDownRefresh = load(path.resolve(__dirname, `../pull-down-refresh`), 't-pull-down-refresh');
diff --git a/src/radio/__test__/demo.test.js b/src/radio/__test__/demo.test.js
index 920bae2e2..07044bb7c 100644
--- a/src/radio/__test__/demo.test.js
+++ b/src/radio/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['align', 'base', 'card', 'horizontal', 'special', 'status', 'theme'];
diff --git a/src/rate/__test__/demo.test.js b/src/rate/__test__/demo.test.js
index afb0871d0..aa8d154ef 100644
--- a/src/rate/__test__/demo.test.js
+++ b/src/rate/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['action', 'base', 'color', 'count', 'custom', 'show-text', 'size', 'special', 'un-filled'];
diff --git a/src/rate/__test__/index.test.js b/src/rate/__test__/index.test.js
index d9ca5c5a3..2d5aa88e7 100644
--- a/src/rate/__test__/index.test.js
+++ b/src/rate/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('Rate', () => {
const tagName = 'rate';
diff --git a/src/result/__test__/demo.test.js b/src/result/__test__/demo.test.js
index 8b3ed696d..e8a74d16b 100644
--- a/src/result/__test__/demo.test.js
+++ b/src/result/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['custom', 'description', 'theme'];
diff --git a/src/result/__test__/index.test.js b/src/result/__test__/index.test.js
index 4e1f5c89d..5c8f44b97 100644
--- a/src/result/__test__/index.test.js
+++ b/src/result/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('result', () => {
const result = load(path.resolve(__dirname, `../result`));
diff --git a/src/search/__test__/demo.test.js b/src/search/__test__/demo.test.js
index ed6e9f10c..b59123a67 100644
--- a/src/search/__test__/demo.test.js
+++ b/src/search/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['action', 'base', 'other', 'shape'];
diff --git a/src/search/__test__/index.test.js b/src/search/__test__/index.test.js
index 76f109c48..5d60cb293 100644
--- a/src/search/__test__/index.test.js
+++ b/src/search/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('search', () => {
const search = load(path.resolve(__dirname, `../search`), 't-search');
diff --git a/src/side-bar/__test__/demo.test.js b/src/side-bar/__test__/demo.test.js
index 714ffdec3..d7882c551 100644
--- a/src/side-bar/__test__/demo.test.js
+++ b/src/side-bar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'custom', 'switch', 'with-icon'];
diff --git a/src/side-bar/__test__/index.test.js b/src/side-bar/__test__/index.test.js
index 932a7c099..737f2e8ad 100644
--- a/src/side-bar/__test__/index.test.js
+++ b/src/side-bar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('side-bar', () => {
const sideBarExample = load(path.resolve(__dirname, `./base/index`), 'side-bar-example');
diff --git a/src/skeleton/__test__/demo.test.js b/src/skeleton/__test__/demo.test.js
index 43a3e2331..89d15ef55 100644
--- a/src/skeleton/__test__/demo.test.js
+++ b/src/skeleton/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['animation', 'cell-group', 'grid', 'image-group', 'theme'];
diff --git a/src/skeleton/__test__/index.test.js b/src/skeleton/__test__/index.test.js
index 7b9149cbc..add013c0f 100644
--- a/src/skeleton/__test__/index.test.js
+++ b/src/skeleton/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const textRowCol = [
{ width: '686rpx', height: '32rpx' },
diff --git a/src/slider/__test__/demo.test.js b/src/slider/__test__/demo.test.js
index ed583589c..765e9e341 100644
--- a/src/slider/__test__/demo.test.js
+++ b/src/slider/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'capsule', 'disabled', 'label', 'max', 'range', 'step'];
diff --git a/src/slider/__test__/index.test.js b/src/slider/__test__/index.test.js
index a50e1c958..45b54f686 100644
--- a/src/slider/__test__/index.test.js
+++ b/src/slider/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('slider', () => {
const slider = load(path.resolve(__dirname, `../slider`), 't-slider');
diff --git a/src/stepper/__test__/demo.test.js b/src/stepper/__test__/demo.test.js
index 388530ee6..2a1754711 100644
--- a/src/stepper/__test__/demo.test.js
+++ b/src/stepper/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'min-max', 'size', 'status', 'theme'];
diff --git a/src/stepper/__test__/index.test.js b/src/stepper/__test__/index.test.js
index 1d150a8c2..d63086134 100644
--- a/src/stepper/__test__/index.test.js
+++ b/src/stepper/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('stepper', () => {
const stepper = load(path.resolve(__dirname, `../stepper`), 't-stepper');
diff --git a/src/steps/__test__/demo.test.js b/src/steps/__test__/demo.test.js
index a24e5a9f7..4a03d6116 100644
--- a/src/steps/__test__/demo.test.js
+++ b/src/steps/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['horizontal', 'special', 'status', 'vertical'];
diff --git a/src/steps/__test__/index.test.js b/src/steps/__test__/index.test.js
index e60b43f5a..2c31b9836 100644
--- a/src/steps/__test__/index.test.js
+++ b/src/steps/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('Steps', () => {
let comp;
diff --git a/src/sticky/__test__/demo.test.js b/src/sticky/__test__/demo.test.js
index e5e317c76..aa9cbcf45 100644
--- a/src/sticky/__test__/demo.test.js
+++ b/src/sticky/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'container', 'offset'];
diff --git a/src/sticky/__test__/index.test.js b/src/sticky/__test__/index.test.js
index e25dfebfb..0fedf560e 100644
--- a/src/sticky/__test__/index.test.js
+++ b/src/sticky/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
beforeAll(() => {
global.getCurrentPages = jest.fn(() => {
diff --git a/src/swipe-cell/__test__/demo.test.js b/src/swipe-cell/__test__/demo.test.js
index ceff5a156..65ebd2f17 100644
--- a/src/swipe-cell/__test__/demo.test.js
+++ b/src/swipe-cell/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['double', 'icon', 'left', 'right'];
diff --git a/src/swipe-cell/__test__/index.test.js b/src/swipe-cell/__test__/index.test.js
index d13c2b2c8..c18919084 100644
--- a/src/swipe-cell/__test__/index.test.js
+++ b/src/swipe-cell/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('SwipeCell', () => {
const swipeCell = load(path.resolve(__dirname, '../swipe-cell'));
diff --git a/src/swiper/__test__/demo.test.js b/src/swiper/__test__/demo.test.js
index 18650e1d7..257982f1e 100644
--- a/src/swiper/__test__/demo.test.js
+++ b/src/swiper/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'cards', 'custom', 'fraction', 'nav-btn', 'vertical'];
diff --git a/src/swiper/__test__/index.test.js b/src/swiper/__test__/index.test.js
index 6f61cabf8..95f41eada 100644
--- a/src/swiper/__test__/index.test.js
+++ b/src/swiper/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('swiper', () => {
const swiperComplex = load(path.resolve(__dirname, `./base/index`), 't-swiper-complex');
diff --git a/src/switch/__test__/demo.test.js b/src/switch/__test__/demo.test.js
index 023cdc8c2..9da85c111 100644
--- a/src/switch/__test__/demo.test.js
+++ b/src/switch/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'color', 'label', 'size', 'status'];
diff --git a/src/switch/__test__/index.test.js b/src/switch/__test__/index.test.js
index 955d36be0..0c88eeb83 100644
--- a/src/switch/__test__/index.test.js
+++ b/src/switch/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
// TODO size 未实现 loading 未实现
diff --git a/src/tab-bar/__test__/demo.test.js b/src/tab-bar/__test__/demo.test.js
index cbc48f64a..abcb124e6 100644
--- a/src/tab-bar/__test__/demo.test.js
+++ b/src/tab-bar/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['badge', 'base', 'custom', 'icon-only', 'round', 'sub', 'text-only'];
diff --git a/src/tab-bar/__test__/index.test.js b/src/tab-bar/__test__/index.test.js
index f6403dca3..d7b12a234 100644
--- a/src/tab-bar/__test__/index.test.js
+++ b/src/tab-bar/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('tab-bar', () => {
const id = load(path.resolve(__dirname, `./index`), 't-tab-bar');
diff --git a/src/tabs/__test__/demo.test.js b/src/tabs/__test__/demo.test.js
index 38517e0e8..05cbbb8fe 100644
--- a/src/tabs/__test__/demo.test.js
+++ b/src/tabs/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'scroll', 'size', 'status', 'theme', 'with-badge', 'with-content', 'with-icon'];
diff --git a/src/tabs/__test__/index.test.js b/src/tabs/__test__/index.test.js
index 41a22d524..f1fb45347 100644
--- a/src/tabs/__test__/index.test.js
+++ b/src/tabs/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
beforeAll(() => {
global.getCurrentPages = jest.fn(() => {
diff --git a/src/tag/__test__/demo.test.js b/src/tag/__test__/demo.test.js
index eb29d4957..cd37ed229 100644
--- a/src/tag/__test__/demo.test.js
+++ b/src/tag/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['checkable', 'closable', 'size', 'theme', 'type'];
diff --git a/src/tag/__test__/index.test.js b/src/tag/__test__/index.test.js
index 680ff879b..306b5bcd6 100644
--- a/src/tag/__test__/index.test.js
+++ b/src/tag/__test__/index.test.js
@@ -1,6 +1,5 @@
-import simulate from 'miniprogram-simulate';
-
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('tag', () => {
const Tag = load(path.resolve(__dirname, `../tag`));
diff --git a/src/textarea/__test__/demo.test.js b/src/textarea/__test__/demo.test.js
index 85186ff74..1cbd48ff5 100644
--- a/src/textarea/__test__/demo.test.js
+++ b/src/textarea/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['autosize', 'base', 'card', 'custom', 'disabled', 'label', 'maxcharacter', 'maxlength'];
diff --git a/src/textarea/__test__/index.test.js b/src/textarea/__test__/index.test.js
index 15330e5e2..4ba58f6b0 100644
--- a/src/textarea/__test__/index.test.js
+++ b/src/textarea/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('textarea', () => {
const textarea = load(path.resolve(__dirname, `../textarea`), 't-textarea');
diff --git a/src/toast/__test__/demo.test.js b/src/toast/__test__/demo.test.js
index 4bffa9c07..dd3716de9 100644
--- a/src/toast/__test__/demo.test.js
+++ b/src/toast/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'close', 'cover', 'display', 'theme'];
diff --git a/src/toast/__test__/index.test.js b/src/toast/__test__/index.test.js
index 7c886028e..d6d08aed5 100644
--- a/src/toast/__test__/index.test.js
+++ b/src/toast/__test__/index.test.js
@@ -1,6 +1,6 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import { showToast, hideToast } from '../index';
import * as Util from '../../common/utils';
diff --git a/src/toast/toast.ts b/src/toast/toast.ts
index ced90018b..500774eb2 100644
--- a/src/toast/toast.ts
+++ b/src/toast/toast.ts
@@ -1,9 +1,9 @@
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import props from './props';
-import { ToastOptionsType } from './index';
import transition from '../mixins/transition';
import { calcIcon } from '../common/utils';
+import { ToastOptionsType } from './index';
const { prefix } = config;
const name = `${prefix}-toast`;
diff --git a/src/transition/__test__/demo.test.js b/src/transition/__test__/demo.test.js
index b92b3b72d..8cf684e9c 100644
--- a/src/transition/__test__/demo.test.js
+++ b/src/transition/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['appear', 'base', 'custom', 'destroy'];
diff --git a/src/tree-select/__test__/demo.test.js b/src/tree-select/__test__/demo.test.js
index e0e887592..3ba7fd7d2 100644
--- a/src/tree-select/__test__/demo.test.js
+++ b/src/tree-select/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['base', 'multiple', 'normal'];
diff --git a/src/tree-select/__test__/index.test.js b/src/tree-select/__test__/index.test.js
index 66c1f24bc..d921f3415 100644
--- a/src/tree-select/__test__/index.test.js
+++ b/src/tree-select/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
describe('tree-select', () => {
const treeSelect = load(path.resolve(__dirname, `../tree-select`));
diff --git a/src/upload/__test__/demo.test.js b/src/upload/__test__/demo.test.js
index c7b6e8c7f..6aa600646 100644
--- a/src/upload/__test__/demo.test.js
+++ b/src/upload/__test__/demo.test.js
@@ -2,8 +2,8 @@
* 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
*/
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
const mapper = ['messageFile', 'multiple', 'single', 'status'];
diff --git a/src/upload/__test__/index.test.js b/src/upload/__test__/index.test.js
index b5f4f6677..f779f4c26 100644
--- a/src/upload/__test__/index.test.js
+++ b/src/upload/__test__/index.test.js
@@ -1,5 +1,5 @@
-import simulate from 'miniprogram-simulate';
import path from 'path';
+import simulate from 'miniprogram-simulate';
import similateApi from 'miniprogram-simulate/src/api';
const mock = (options, res) => {