+
-
+
+
+
+
@@ -94,7 +156,7 @@ exports[`renders demo correctly 1`] = `
9
-
@@ -102,12 +164,13 @@ exports[`renders demo correctly 1`] = `
0
+
-
+
`;
diff --git a/src/password-input/test/demo.legacy.js b/src/password-input/test/demo.spec.js
similarity index 100%
rename from src/password-input/test/demo.legacy.js
rename to src/password-input/test/demo.spec.js
diff --git a/src/picker/test/__snapshots__/demo.legacy.js.snap b/src/picker/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 1ff6f9c21..000000000
--- a/src/picker/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,295 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-
-
- -
-
杭州
-
- -
-
宁波
-
- -
-
温州
-
- -
-
绍兴
-
- -
-
湖州
-
- -
-
嘉兴
-
- -
-
金华
-
- -
-
衢州
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
杭州
-
- -
-
宁波
-
- -
-
温州
-
- -
-
绍兴
-
- -
-
湖州
-
- -
-
嘉兴
-
- -
-
金华
-
- -
-
衢州
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
周一
-
- -
-
周二
-
- -
-
周三
-
- -
-
周四
-
- -
-
周五
-
-
-
-
-
- -
-
上午
-
- -
-
下午
-
- -
-
晚上
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
杭州
-
- -
-
宁波
-
- -
-
温州
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
杭州
-
- -
-
宁波
-
- -
-
温州
-
- -
-
嘉兴
-
- -
-
湖州
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
杭州
-
- -
-
宁波
-
- -
-
温州
-
- -
-
嘉兴
-
- -
-
湖州
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/picker/test/__snapshots__/demo.spec.js.snap b/src/picker/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..aecfb9a0f
--- /dev/null
+++ b/src/picker/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,325 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+ -
+
杭州
+
+ -
+
宁波
+
+ -
+
温州
+
+ -
+
绍兴
+
+ -
+
湖州
+
+ -
+
嘉兴
+
+ -
+
金华
+
+ -
+
衢州
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
杭州
+
+ -
+
宁波
+
+ -
+
温州
+
+ -
+
绍兴
+
+ -
+
湖州
+
+ -
+
嘉兴
+
+ -
+
金华
+
+ -
+
衢州
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
周一
+
+ -
+
周二
+
+ -
+
周三
+
+ -
+
周四
+
+ -
+
周五
+
+
+
+
+
+ -
+
上午
+
+ -
+
下午
+
+ -
+
晚上
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
杭州
+
+ -
+
宁波
+
+ -
+
温州
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
杭州
+
+ -
+
宁波
+
+ -
+
温州
+
+ -
+
嘉兴
+
+ -
+
湖州
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
杭州
+
+ -
+
宁波
+
+ -
+
温州
+
+ -
+
嘉兴
+
+ -
+
湖州
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/picker/test/demo.legacy.js b/src/picker/test/demo.spec.js
similarity index 100%
rename from src/picker/test/demo.legacy.js
rename to src/picker/test/demo.spec.js
diff --git a/src/popup/test/__snapshots__/demo.legacy.js.snap b/src/popup/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 29daf9410..000000000
--- a/src/popup/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,65 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/popup/test/__snapshots__/demo.spec.js.snap b/src/popup/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..eae760f5d
--- /dev/null
+++ b/src/popup/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,180 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
展示弹出层
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
自定义图标
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
指定挂载节点
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/popup/test/demo.legacy.js b/src/popup/test/demo.spec.js
similarity index 100%
rename from src/popup/test/demo.legacy.js
rename to src/popup/test/demo.spec.js
diff --git a/src/progress/test/__snapshots__/demo.legacy.js.snap b/src/progress/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 66c2e29a9..000000000
--- a/src/progress/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,20 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/progress/test/__snapshots__/demo.spec.js.snap b/src/progress/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..60c78ebb0
--- /dev/null
+++ b/src/progress/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,18 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+`;
diff --git a/src/progress/test/demo.legacy.js b/src/progress/test/demo.spec.js
similarity index 100%
rename from src/progress/test/demo.legacy.js
rename to src/progress/test/demo.spec.js
diff --git a/src/pull-refresh/test/__snapshots__/demo.legacy.js.snap b/src/pull-refresh/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index ab7e8350b..000000000
--- a/src/pull-refresh/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,32 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
基础用法
-
成功提示
-
自定义提示
-
-
-
-
-
-
-`;
diff --git a/src/pull-refresh/test/__snapshots__/demo.spec.js.snap b/src/pull-refresh/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..000948eb4
--- /dev/null
+++ b/src/pull-refresh/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,32 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
基础用法
+
成功提示
+
自定义提示
+
+
+
+
+
+
+`;
diff --git a/src/pull-refresh/test/demo.legacy.js b/src/pull-refresh/test/demo.spec.js
similarity index 100%
rename from src/pull-refresh/test/demo.legacy.js
rename to src/pull-refresh/test/demo.spec.js
diff --git a/src/radio/test/__snapshots__/demo.legacy.js.snap b/src/radio/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 37780ae48..000000000
--- a/src/radio/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,132 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/radio/test/__snapshots__/demo.spec.js.snap b/src/radio/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..f7b0c1bbe
--- /dev/null
+++ b/src/radio/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,162 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/radio/test/demo.legacy.js b/src/radio/test/demo.spec.js
similarity index 100%
rename from src/radio/test/demo.legacy.js
rename to src/radio/test/demo.spec.js
diff --git a/src/rate/test/__snapshots__/demo.legacy.js.snap b/src/rate/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 7e13e68b1..000000000
--- a/src/rate/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,125 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/rate/test/__snapshots__/demo.spec.js.snap b/src/rate/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..a9dd8329d
--- /dev/null
+++ b/src/rate/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,287 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/rate/test/demo.legacy.js b/src/rate/test/demo.spec.js
similarity index 100%
rename from src/rate/test/demo.legacy.js
rename to src/rate/test/demo.spec.js
diff --git a/src/search/test/__snapshots__/demo.legacy.js.snap b/src/search/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 8254c31ba..000000000
--- a/src/search/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,91 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/search/test/__snapshots__/demo.spec.js.snap b/src/search/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..0e91e90d3
--- /dev/null
+++ b/src/search/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,170 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+`;
diff --git a/src/search/test/demo.legacy.js b/src/search/test/demo.spec.js
similarity index 100%
rename from src/search/test/demo.legacy.js
rename to src/search/test/demo.spec.js
diff --git a/src/share-sheet/test/__snapshots__/demo.legacy.js.snap b/src/share-sheet/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 0e8949134..000000000
--- a/src/share-sheet/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,34 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/share-sheet/test/__snapshots__/demo.spec.js.snap b/src/share-sheet/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..0f6792445
--- /dev/null
+++ b/src/share-sheet/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,80 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
显示分享面板
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
显示分享面板
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
显示分享面板
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
显示分享面板
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/share-sheet/test/demo.legacy.js b/src/share-sheet/test/demo.spec.js
similarity index 100%
rename from src/share-sheet/test/demo.legacy.js
rename to src/share-sheet/test/demo.spec.js
diff --git a/src/sidebar/test/__snapshots__/demo.legacy.js.snap b/src/sidebar/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index a5221621b..000000000
--- a/src/sidebar/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,77 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/sidebar/test/__snapshots__/demo.spec.js.snap b/src/sidebar/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..22a41b675
--- /dev/null
+++ b/src/sidebar/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,77 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+`;
diff --git a/src/sidebar/test/demo.legacy.js b/src/sidebar/test/demo.spec.js
similarity index 100%
rename from src/sidebar/test/demo.legacy.js
rename to src/sidebar/test/demo.spec.js
diff --git a/src/skeleton/test/__snapshots__/demo.legacy.js.snap b/src/skeleton/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 785a20ad3..000000000
--- a/src/skeleton/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,41 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/skeleton/test/__snapshots__/demo.spec.js.snap b/src/skeleton/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..5a65dd484
--- /dev/null
+++ b/src/skeleton/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,42 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+`;
diff --git a/src/skeleton/test/demo.legacy.js b/src/skeleton/test/demo.spec.js
similarity index 100%
rename from src/skeleton/test/demo.legacy.js
rename to src/skeleton/test/demo.spec.js
diff --git a/src/slider/test/__snapshots__/demo.legacy.js.snap b/src/slider/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 568a82e25..000000000
--- a/src/slider/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,93 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/slider/test/__snapshots__/demo.spec.js.snap b/src/slider/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..60ea3deac
--- /dev/null
+++ b/src/slider/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,91 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+`;
diff --git a/src/slider/test/demo.legacy.js b/src/slider/test/demo.spec.js
similarity index 100%
rename from src/slider/test/demo.legacy.js
rename to src/slider/test/demo.spec.js
diff --git a/src/stepper/test/__snapshots__/demo.legacy.js.snap b/src/stepper/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 5637c6aa8..000000000
--- a/src/stepper/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,66 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/stepper/test/__snapshots__/demo.spec.js.snap b/src/stepper/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..5224832e8
--- /dev/null
+++ b/src/stepper/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,114 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/stepper/test/demo.legacy.js b/src/stepper/test/demo.spec.js
similarity index 100%
rename from src/stepper/test/demo.legacy.js
rename to src/stepper/test/demo.spec.js
diff --git a/src/steps/test/__snapshots__/demo.legacy.js.snap b/src/steps/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 98a80d91e..000000000
--- a/src/steps/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,96 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-
-
-
【城市】物流状态1
-
2016-07-12 12:40
-
-
-
-
-
-
-
-
【城市】物流状态
-
2016-07-11 10:00
-
-
-
-
-
-
-
快件已发货
-
2016-07-10 09:30
-
-
-
-
-
-
-
-
-`;
diff --git a/src/steps/test/__snapshots__/demo.spec.js.snap b/src/steps/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..48b55b4e0
--- /dev/null
+++ b/src/steps/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,109 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
【城市】物流状态1
+
2016-07-12 12:40
+
+
+
+
+
+
+
+
+
+
【城市】物流状态
+
2016-07-11 10:00
+
+
+
+
+
+
+
快件已发货
+
2016-07-10 09:30
+
+
+
+
+
+
+
+`;
diff --git a/src/steps/test/demo.legacy.js b/src/steps/test/demo.spec.js
similarity index 100%
rename from src/steps/test/demo.legacy.js
rename to src/steps/test/demo.spec.js
diff --git a/src/sticky/test/__snapshots__/demo.legacy.js.snap b/src/sticky/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 07457da6f..000000000
--- a/src/sticky/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,35 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/sticky/test/__snapshots__/demo.spec.js.snap b/src/sticky/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..4a6e6e62a
--- /dev/null
+++ b/src/sticky/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,36 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+`;
diff --git a/src/sticky/test/demo.legacy.js b/src/sticky/test/demo.spec.js
similarity index 100%
rename from src/sticky/test/demo.legacy.js
rename to src/sticky/test/demo.spec.js
diff --git a/src/submit-bar/test/__snapshots__/demo.legacy.js.snap b/src/submit-bar/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index df6874505..000000000
--- a/src/submit-bar/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,55 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
- 你的收货地址不支持同城送, 我们已为你推荐快递
-
-
-
-
-
-
-
- 你的收货地址不支持同城送,
-
- 修改地址
-
-
-
-
-
-`;
diff --git a/src/submit-bar/test/__snapshots__/demo.spec.js.snap b/src/submit-bar/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..dd80a1238
--- /dev/null
+++ b/src/submit-bar/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,87 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
合计:¥30.50
+
+
+
+
+
+
+
+
+
+
+
+ 你的收货地址不支持同城送, 我们已为你推荐快递
+
+
+
+
+
合计:¥30.50
+
+
+
+
+
+
+
+
+
+
+
+ 你的收货地址不支持同城送, 修改地址
+
+
+
合计:¥30.50
+
+
+
+
+
+`;
diff --git a/src/submit-bar/test/demo.legacy.js b/src/submit-bar/test/demo.spec.js
similarity index 100%
rename from src/submit-bar/test/demo.legacy.js
rename to src/submit-bar/test/demo.spec.js
diff --git a/src/swipe-cell/test/__snapshots__/demo.legacy.js.snap b/src/swipe-cell/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 2e9ca3965..000000000
--- a/src/swipe-cell/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,72 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/swipe-cell/test/__snapshots__/demo.spec.js.snap b/src/swipe-cell/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..4aaa4bf23
--- /dev/null
+++ b/src/swipe-cell/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,106 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/swipe-cell/test/demo.legacy.js b/src/swipe-cell/test/demo.spec.js
similarity index 100%
rename from src/swipe-cell/test/demo.legacy.js
rename to src/swipe-cell/test/demo.spec.js
diff --git a/src/swipe/test/__snapshots__/demo.legacy.js.snap b/src/swipe/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 799f7af64..000000000
--- a/src/swipe/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,72 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/swipe/test/__snapshots__/demo.spec.js.snap b/src/swipe/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..cdcf1fc47
--- /dev/null
+++ b/src/swipe/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,78 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+

+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/swipe/test/demo.legacy.js b/src/swipe/test/demo.spec.js
similarity index 100%
rename from src/swipe/test/demo.legacy.js
rename to src/swipe/test/demo.spec.js
diff --git a/src/switch/test/__snapshots__/demo.legacy.js.snap b/src/switch/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index c05490ce5..000000000
--- a/src/switch/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,46 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/switch/test/__snapshots__/demo.spec.js.snap b/src/switch/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..53b7b02b2
--- /dev/null
+++ b/src/switch/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,63 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+
+`;
diff --git a/src/switch/test/demo.legacy.js b/src/switch/test/demo.spec.js
similarity index 100%
rename from src/switch/test/demo.legacy.js
rename to src/switch/test/demo.spec.js
diff --git a/src/tab/test/__snapshots__/demo.legacy.js.snap b/src/tab/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 1a4709130..000000000
--- a/src/tab/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,349 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
标签 1
-
标签 2
-
标签 3
-
标签 4
-
-
-
-
-
-
-
-
-
-
-
- 内容 3
-
-
-
-
-
-
-
-
-
-
-
-
-
- 内容 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
标签 1
-
标签 2
-
标签 3
-
标签 4
-
-
-
-
-
-
-
-
-
-
-
-
-
- 内容 3
-
-
-
-
-
-
-
-
-
-
-
-
-
标签 1
-
标签 2
-
标签 3
-
标签 4
-
-
-
-
-
-
-
-
-
-
-
标签 1
-
标签 2
-
标签 3
-
标签 4
-
-
-
-
-
-
-
-
-
-
-
- 内容 3
-
-
-
-
-
-
-
-
-
-
-
-
- 内容 1
-
-
- 内容 2
-
-
- 内容 3
-
-
- 内容 4
-
-
- 内容 5
-
-
- 内容 6
-
-
- 内容 7
-
-
- 内容 8
-
-
-
-
-
-
-
-
-
标签 1
-
标签 2
-
标签 3
-
标签 4
-
-
-
-
-
- 内容 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/tab/test/__snapshots__/demo.spec.js.snap b/src/tab/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..77bc254fe
--- /dev/null
+++ b/src/tab/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,340 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
标签 4
+
+
+
+
+
+
+
+
+
+
+
+
内容 3
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
+
+
+
+
+
+
+
+
+
+
+
内容 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
标签 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
内容 3
+
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
标签 4
+
+
+
+
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
标签 4
+
+
+
+
+
+
+
+
+
+
+
+
内容 1
+
内容 2
+
内容 3
+
内容 4
+
内容 5
+
内容 6
+
内容 7
+
内容 8
+
+
+
+
+
+
+
+
+
标签 1
+
标签 2
+
标签 3
+
标签 4
+
+
+
+
+
+
内容 1
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/tab/test/demo.legacy.js b/src/tab/test/demo.spec.js
similarity index 100%
rename from src/tab/test/demo.legacy.js
rename to src/tab/test/demo.spec.js
diff --git a/src/tabbar-item/index.js b/src/tabbar-item/index.js
index cfc064997..67b643ef5 100644
--- a/src/tabbar-item/index.js
+++ b/src/tabbar-item/index.js
@@ -32,10 +32,10 @@ export default createComponent({
const { parent, index } = useParent(TABBAR_KEY);
const active = computed(() => {
- const { $route } = vm;
const { route, modelValue } = parent.props;
- if (route && $route) {
+ if (route && '$route' in vm) {
+ const { $route } = vm;
const { to } = props;
const config = isObject(to) ? to : { path: to };
const pathMatched = config.path === $route.path;
diff --git a/src/tabbar/test/__snapshots__/demo.legacy.js.snap b/src/tabbar/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index c65307606..000000000
--- a/src/tabbar/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,202 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-
-

-
3
-
-
自定义
-
-
-
-
-
-
-
-
-`;
diff --git a/src/tabbar/test/__snapshots__/demo.spec.js.snap b/src/tabbar/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..94e30daae
--- /dev/null
+++ b/src/tabbar/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,234 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+
+

+
3
+
+
自定义
+
+
+
+
+
+
+
+`;
diff --git a/src/tabbar/test/demo.legacy.js b/src/tabbar/test/demo.spec.js
similarity index 100%
rename from src/tabbar/test/demo.legacy.js
rename to src/tabbar/test/demo.spec.js
diff --git a/src/tag/test/__snapshots__/demo.legacy.js.snap b/src/tag/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 5a3bfb560..000000000
--- a/src/tag/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,72 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/tag/test/__snapshots__/demo.spec.js.snap b/src/tag/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..3ed3e9f7f
--- /dev/null
+++ b/src/tag/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,166 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
primary 类型
+
+
+
+ 标签
+
+
+
+
+
+
+
success 类型
+
+
+
+ 标签
+
+
+
+
+
+
+
danger 类型
+
+
+
+ 标签
+
+
+
+
+
+
+
warning 类型
+
+
+
+ 标签
+
+
+
+
+
+
+
+
+
空心样式
+
+
+
+ 标签
+
+
+
+
+
+
+
圆角样式
+
+
+
+ 标签
+
+
+
+
+
+
+
标记样式
+
+
+
+ 标签
+
+
+
+
+
+
+
可关闭标签
+
+
+
+ 标签
+
+
+
+
+
+
+
+
+
小号标签
+
+
+
+ 标签
+
+
+
+
+
+
+
中号标签
+
+
+
+ 标签
+
+
+
+
+
+
+
大号标签
+
+
+
+ 标签
+
+
+
+
+
+
+
+
+
背景颜色
+
+
+
+ 标签
+
+
+
+
+
+
+
文字颜色
+
+
+
+ 标签
+
+
+
+
+
+
+
空心颜色
+
+
+
+ 标签
+
+
+
+
+
+`;
diff --git a/src/tag/test/demo.legacy.js b/src/tag/test/demo.spec.js
similarity index 100%
rename from src/tag/test/demo.legacy.js
rename to src/tag/test/demo.spec.js
diff --git a/src/toast/test/__snapshots__/demo.legacy.js.snap b/src/toast/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 86f4e1ebb..000000000
--- a/src/toast/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,54 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-`;
diff --git a/src/toast/test/__snapshots__/demo.spec.js.snap b/src/toast/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..6e98bb8c7
--- /dev/null
+++ b/src/toast/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,122 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
自定义图标
+
+
+
+
+
+
+
+
+
+
+
自定义图片
+
+
+
+
+
+
+
+
+
+
+
自定义加载图标
+
+
+
+
+
+
+
+
+
+
+
+
+
+
动态更新提示
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/toast/test/demo.legacy.js b/src/toast/test/demo.spec.js
similarity index 100%
rename from src/toast/test/demo.legacy.js
rename to src/toast/test/demo.spec.js
diff --git a/src/tree-select/test/__snapshots__/demo.legacy.js.snap b/src/tree-select/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 073f62275..000000000
--- a/src/tree-select/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,90 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-
杭州
-
-
温州
-
-
宁波
-
义乌
-
-
-
-
-
-
-`;
diff --git a/src/tree-select/test/__snapshots__/demo.spec.js.snap b/src/tree-select/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..0023e6143
--- /dev/null
+++ b/src/tree-select/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,117 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
杭州
+
+
+
+
温州
+
+
+
宁波
+
+
+
义乌
+
+
+
+
+
+
+
+
+
+
杭州
+
+
+
+
温州
+
+
+
+
宁波
+
+
+
义乌
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
杭州
+
+
+
+
温州
+
+
+
宁波
+
+
+
义乌
+
+
+
+
+
+`;
diff --git a/src/tree-select/test/demo.legacy.js b/src/tree-select/test/demo.spec.js
similarity index 100%
rename from src/tree-select/test/demo.legacy.js
rename to src/tree-select/test/demo.spec.js
diff --git a/src/uploader/test/__snapshots__/demo.legacy.js.snap b/src/uploader/test/__snapshots__/demo.legacy.js.snap
deleted file mode 100644
index 6eb7af534..000000000
--- a/src/uploader/test/__snapshots__/demo.legacy.js.snap
+++ /dev/null
@@ -1,147 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`renders demo correctly 1`] = `
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/uploader/test/__snapshots__/demo.spec.js.snap b/src/uploader/test/__snapshots__/demo.spec.js.snap
new file mode 100644
index 000000000..38c118b67
--- /dev/null
+++ b/src/uploader/test/__snapshots__/demo.spec.js.snap
@@ -0,0 +1,213 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render demo and match snapshot 1`] = `
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/uploader/test/demo.legacy.js b/src/uploader/test/demo.spec.js
similarity index 100%
rename from src/uploader/test/demo.legacy.js
rename to src/uploader/test/demo.spec.js
diff --git a/test/demo.ts b/test/demo.ts
index d60c1687a..48dcc6744 100644
--- a/test/demo.ts
+++ b/test/demo.ts
@@ -11,7 +11,7 @@ const EmptyComponent = {
};
export function snapshotDemo(Demo: any, option: any = {}) {
- test('renders demo correctly', async () => {
+ test('should render demo and match snapshot', async () => {
if (option.beforeTest) {
option.beforeTest();
}