Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9380d93e
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看板
未验证
提交
9380d93e
编写于
4月 26, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 26, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8537 xts适配兼容性问题回合
Merge pull request !8537 from 杜智海/cherry-pick-1682388432
上级
456c3dce
dc2ad5e7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
25 deletion
+33
-25
ability/dmsfwk/continuationmanagertest/src/main/js/test/ContinuationManagerJsunit.test.js
...ertest/src/main/js/test/ContinuationManagerJsunit.test.js
+33
-25
未找到文件。
ability/dmsfwk/continuationmanagertest/src/main/js/test/ContinuationManagerJsunit.test.js
浏览文件 @
9380d93e
...
...
@@ -38,20 +38,34 @@ describe('continuationManagerTest', function() {
beforeEach
(
async
function
(
done
)
{
console
.
info
(
'
beforeEach
'
);
await
continuationManager
.
register
(
function
(
err
,
data
)
{
token
=
data
;
console
.
info
(
'
beforeEach register success
'
);
done
();
});
try
{
await
continuationManager
.
registerContinuation
().
then
((
data
)
=>
{
token
=
data
;
console
.
info
(
'
beforeEach registerContinuation success
'
);
done
();
})
.
catch
((
e
)
=>
{
console
.
info
(
"
beforeEach promise error:
"
+
e
);
});
}
catch
(
e
)
{
console
.
info
(
"
beforeEach try error:
"
+
e
);
}
console
.
info
(
'
beforeEach end
'
);
})
afterEach
(
async
function
(
done
)
{
console
.
info
(
'
afterEach
'
);
await
continuationManager
.
unregister
(
token
,
function
(
err
,
data
)
{
console
.
info
(
'
afterEach unregister success
'
);
done
();
});
try
{
await
continuationManager
.
unregisterContinuation
(
token
).
then
((
data
)
=>
{
console
.
info
(
'
afterEach unregisterContinuation success
'
);
done
();
})
.
catch
((
e
)
=>
{
console
.
info
(
"
afterEach promise error:
"
+
e
);
});
}
catch
(
e
)
{
console
.
info
(
"
afterEach try error:
"
+
e
);
}
console
.
info
(
'
afterEach end
'
);
})
...
...
@@ -65,7 +79,6 @@ describe('continuationManagerTest', function() {
console
.
info
(
"
testRegister001Begin
"
);
continuationManager
.
register
(
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -146,7 +159,6 @@ describe('continuationManagerTest', function() {
};
continuationManager
.
register
(
continuationExtraParams
,
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -174,7 +186,6 @@ describe('continuationManagerTest', function() {
};
continuationManager
.
register
(
continuationExtraParams
,
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -200,7 +211,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
register
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
29360210
).
assertTrue
();
});
...
...
@@ -227,7 +238,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
register
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
29360210
).
assertTrue
();
});
...
...
@@ -254,7 +265,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{}
};
continuationManager
.
register
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
!=
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
29360210
).
assertTrue
();
});
...
...
@@ -281,7 +292,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
register
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
!=
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
29360210
).
assertTrue
();
});
...
...
@@ -302,7 +313,7 @@ describe('continuationManagerTest', function() {
it
(
'
testRegister010
'
,
0
,
async
function
(
done
)
{
try
{
continuationManager
.
register
().
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
29360210
).
assertTrue
();
});
...
...
@@ -323,7 +334,6 @@ describe('continuationManagerTest', function() {
console
.
info
(
"
testRegisterContinuation001Begin
"
);
continuationManager
.
registerContinuation
(
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -404,7 +414,6 @@ describe('continuationManagerTest', function() {
};
continuationManager
.
registerContinuation
(
continuationExtraParams
,
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -431,7 +440,6 @@ describe('continuationManagerTest', function() {
};
continuationManager
.
registerContinuation
(
continuationExtraParams
,
function
(
err
,
data
)
{
expect
(
err
.
code
==
0
).
assertTrue
();
expect
(
data
-
token
==
1
).
assertTrue
();
done
();
});
}
catch
(
e
)
{
...
...
@@ -457,7 +465,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
registerContinuation
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
16600002
).
assertTrue
();
});
...
...
@@ -483,7 +491,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
registerContinuation
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
16600002
).
assertTrue
();
});
...
...
@@ -509,7 +517,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{}
};
continuationManager
.
registerContinuation
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
!=
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
401
).
assertTrue
();
});
...
...
@@ -535,7 +543,7 @@ describe('continuationManagerTest', function() {
authInfo
:
{
"
name
"
:
"
authInfo
"
,
"
length
"
:
8
}
};
continuationManager
.
registerContinuation
(
continuationExtraParams
).
then
((
data
)
=>
{
expect
(
data
-
token
!=
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
16600002
).
assertTrue
();
});
...
...
@@ -555,7 +563,7 @@ describe('continuationManagerTest', function() {
it
(
'
testRegisterContinuation010
'
,
0
,
async
function
(
done
)
{
try
{
continuationManager
.
registerContinuation
().
then
((
data
)
=>
{
expect
(
data
-
token
==
1
).
assertTrue
();
expect
(
data
!=
-
1
).
assertTrue
();
}).
catch
((
err
)
=>
{
expect
(
err
.
code
==
16600002
).
assertTrue
();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录