Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
362cd0dc
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
362cd0dc
编写于
9月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5775 testClearInterval 修复 beta3
Merge pull request !5775 from Nicklaus/master
上级
e80153fb
8984f1bb
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
462 addition
and
457 deletion
+462
-457
arkui/ace_js_attribute_api/src/main/js/test/basicabilityapi.test.js
...js_attribute_api/src/main/js/test/basicabilityapi.test.js
+462
-457
未找到文件。
arkui/ace_js_attribute_api/src/main/js/test/basicabilityapi.test.js
浏览文件 @
362cd0dc
...
@@ -19,7 +19,7 @@ import router from '@system.router';
...
@@ -19,7 +19,7 @@ import router from '@system.router';
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
;
export
default
function
basicabilityapi
()
{
export
default
function
basicabilityapi
()
{
describe
(
'
basicabilityapi
'
,
function
()
{
describe
(
'
basicabilityapi
'
,
function
()
{
let
testResult
;
let
testResult
;
let
testResultFail
;
let
testResultFail
;
let
test
;
let
test
;
...
@@ -63,21 +63,25 @@ describe('basicabilityapi', function () {
...
@@ -63,21 +63,25 @@ describe('basicabilityapi', function () {
it
(
'
testClearInterval
'
,
0
,
async
function
(
done
)
{
it
(
'
testClearInterval
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testClearInterval START
'
);
console
.
info
(
'
testClearInterval START
'
);
let
res
=
0
;
let
res
=
0
;
let
testTimes
=
5
let
intervalID
=
-
1
;
let
intervalID
=
-
1
;
let
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
let
promise1
=
new
Promise
((
resolve
,
reject
)
=>
{
intervalID
=
setInterval
(
function
()
{
intervalID
=
setInterval
(
function
()
{
if
(
res
===
testTimes
){
clearInterval
(
intervalID
);
}
res
++
;
res
++
;
console
.
info
(
'
testClearInterval res =
'
+
res
);
console
.
info
(
'
testClearInterval res =
'
+
res
);
resolve
();
resolve
();
},
100
);
},
100
);
});
});
Promise
.
all
([
promise1
]).
then
(()
=>
{
let
promise2
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(
function
()
{
console
.
info
(
'
[clearInterval] start
'
);
clearInterval
(
intervalID
);
console
.
info
(
'
[clearInterval] end
'
);
resolve
();
},
600
);
});
Promise
.
all
([
promise1
,
promise2
]).
then
(()
=>
{
console
.
info
(
'
testClearInterval finally
'
);
console
.
info
(
'
testClearInterval finally
'
);
expect
(
testTimes
).
assertEqual
(
res
);
expect
(
5
).
assertEqual
(
res
);
console
.
info
(
'
testClearInterval END
'
);
console
.
info
(
'
testClearInterval END
'
);
done
();
done
();
});
});
...
@@ -487,6 +491,7 @@ describe('basicabilityapi', function () {
...
@@ -487,6 +491,7 @@ describe('basicabilityapi', function () {
},
1000
);
},
1000
);
});
});
/**
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_1500
* @tc.number SUB_ACE_BASICABILITY_JS_API_1500
* @tc.name testRequestAnimationFrame
* @tc.name testRequestAnimationFrame
...
@@ -519,5 +524,5 @@ describe('basicabilityapi', function () {
...
@@ -519,5 +524,5 @@ describe('basicabilityapi', function () {
done
();
done
();
},
1000
);
},
1000
);
});
});
});
});
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录