File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import VueCompositionApi from '@vue/composition-api'
27
27
28
28
Vue .use (VueCompositionApi)
29
29
30
- import {
30
+ import {
31
31
reactive ,
32
32
computed
33
33
} from ' @vue/composition-api'
@@ -67,7 +67,7 @@ export default {
67
67
68
68
## 测试 Props 中传入的 Message
69
69
70
- 测试 message 被妥当地渲染是小事一桩。我们只消使用 ` propsData ` 设置属性值即可,正如 [ 这里] ( /components-with-props.html ) 所描述的。
70
+ 测试 message 被妥当地渲染是小事一桩。我们只须使用 ` propsData ` 设置属性值即可,正如 [ 这里] ( /components-with-props.html ) 所描述的。
71
71
72
72
``` js
73
73
import { shallowMount } from " @vue/test-utils"
@@ -120,4 +120,4 @@ describe("CompositionApi", () => {
120
120
121
121
应该有可能在无需修改单元测试的前提下,使用 Composition API 重构任何传统的 Vue 组件。如果你发现自己在重构时需要更改测试,很可能就是之前测试了 * 具体实现* ,而非输出。
122
122
123
- 虽然是个动人的新特性,但 Composition API 完全是锦上添花的,所以不需要立刻去用它,但是无论你如何抉择,记住一个好的单元测试只断言组件的最终状态,而不用考虑其实现细节。
123
+ 虽然是个动人的新特性,但 Composition API 完全是锦上添花的,所以不需要立刻去用它,但是无论你如何抉择,记住一个好的单元测试只断言组件的最终状态,而不用考虑其实现细节。
You can’t perform that action at this time.
0 commit comments