Skip to content

Commit f96f834

Browse files
authored
docs: update detail.md
1 parent bce3fb3 commit f96f834

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/detail.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ simulate.load('/comp', 'custom-comp') // 渲染出来的结果是 <comp><wx-view
5656
}
5757
```
5858

59-
这种写法的,它会从我们提供的根路径开始寻找对应组件但是使用相对路径写法,则无需做任何处理:
59+
这种绝对路径写法的,它会从我们提供的根路径开始寻找对应组件但是使用相对路径写法,则无需做任何处理:
6060

6161
```json
6262
{
@@ -69,10 +69,6 @@ simulate.load('/comp', 'custom-comp') // 渲染出来的结果是 <comp><wx-view
6969

7070
> PS:关于 rootPath 的设置,可查看[此文档](./api.md#options)
7171
72-
这样才能正确找到使用的自定义组件。
73-
74-
> PS:并不是所有绝对路径都需要改成相对路径,有些绝对路径在测试过程中我们不需要真实去处理,所以直接保留也没有太大问题。
75-
7672
## wx 对象
7773

7874
小程序运行环境中会注入一个 wx 对象,上面提供各种接口以供开发使用。但是此测试环境是运行在 nodejs 上,不存在这些接口的底层实现,因此开发者在写测试用例时对于自己将要使用的接口进行模拟,例如:

0 commit comments

Comments
 (0)