Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
63e433a2
H
hello-uvue
项目概览
DCloud
/
hello-uvue
通知
350
Star
2
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello-uvue
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
63e433a2
编写于
4月 03, 2024
作者:
W
wangjinxin613
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 调整测试例兼容 android
上级
83407edf
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
7 addition
and
11 deletion
+7
-11
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
...position-api/reactivity/watch-effect/watch-effect.test.js
+1
-1
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
...pi/reactivity/watch-post-effect/watch-post-effect.test.js
+3
-5
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
...pi/reactivity/watch-sync-effect/watch-sync-effect.test.js
+3
-5
未找到文件。
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
浏览文件 @
63e433a2
...
@@ -133,7 +133,7 @@ describe('watchEffect', () => {
...
@@ -133,7 +133,7 @@ describe('watchEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"arr":[0
],"bool":false,"num":0,"str":"num: 0
"}
'
)
'
watch obj result: obj: {"arr":[0
,1],"bool":true,"num":1,"str":"num: 1
"}
'
)
}
}
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
...
...
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
浏览文件 @
63e433a2
...
@@ -107,8 +107,7 @@ describe('watchPostEffect', () => {
...
@@ -107,8 +107,7 @@ describe('watchPostEffect', () => {
const
watchObjRes
=
await
page
.
$
(
'
#watch-obj-res
'
)
const
watchObjRes
=
await
page
.
$
(
'
#watch-obj-res
'
)
// TODO web端和安卓端JSON.stringify对属性的排序不一致
// TODO web端和安卓端JSON.stringify对属性的排序不一致
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
'
IOS
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}
'
'
watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}
'
)
)
...
@@ -136,14 +135,13 @@ describe('watchPostEffect', () => {
...
@@ -136,14 +135,13 @@ describe('watchPostEffect', () => {
expect
(
await
objBool
.
text
()).
toBe
(
'
obj.bool: true
'
)
expect
(
await
objBool
.
text
()).
toBe
(
'
obj.bool: true
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0,1]
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0,1]
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
'
IOS
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}
'
'
watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}
'
)
)
}
else
{
}
else
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"arr":[0
],"bool":false,"num":0,"str":"num: 0
"}
'
'
watch obj result: obj: {"arr":[0
,1],"bool":true,"num":1,"str":"num: 1
"}
'
)
)
}
}
expect
(
await
watchObjStrRes
.
text
()).
toBe
(
expect
(
await
watchObjStrRes
.
text
()).
toBe
(
...
...
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
浏览文件 @
63e433a2
...
@@ -106,8 +106,7 @@ describe('watchSyncEffect', () => {
...
@@ -106,8 +106,7 @@ describe('watchSyncEffect', () => {
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0]
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0]
'
)
const
watchObjRes
=
await
page
.
$
(
'
#watch-obj-res
'
)
const
watchObjRes
=
await
page
.
$
(
'
#watch-obj-res
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
'
IOS
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}
'
'
watch obj result: obj: {"num":0,"str":"num: 0","bool":false,"arr":[0]}
'
)
)
...
@@ -136,14 +135,13 @@ describe('watchSyncEffect', () => {
...
@@ -136,14 +135,13 @@ describe('watchSyncEffect', () => {
expect
(
await
objBool
.
text
()).
toBe
(
'
obj.bool: true
'
)
expect
(
await
objBool
.
text
()).
toBe
(
'
obj.bool: true
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0,1]
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: [0,1]
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
'
IOS
'
))
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}
'
'
watch obj result: obj: {"num":1,"str":"num: 1","bool":true,"arr":[0,1]}
'
)
)
}
else
{
}
else
{
expect
(
await
watchObjRes
.
text
()).
toBe
(
expect
(
await
watchObjRes
.
text
()).
toBe
(
'
watch obj result: obj: {"arr":[0
],"bool":false,"num":0,"str":"num: 0
"}
'
'
watch obj result: obj: {"arr":[0
,1],"bool":true,"num":1,"str":"num: 1
"}
'
)
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录