未验证 提交 2bd7925f 编写于 作者: O openharmony_ci 提交者: Gitee

!4705 getAbilityLabel接口callback形式,调用成功第一个参数为null

Merge pull request !4705 from 耿文广/cherry-pick-1659085686
......@@ -268,7 +268,7 @@ export default function actsBmsJsModuleNameTest() {
expect(err).assertFail();
});
bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
expect(err).assertNull();
if (err) {
console.error('[GetAbilityLabel_0300]Operation failed. Err: ' + JSON.stringify(err));
}
......
......@@ -41,7 +41,7 @@ export default function getAbilityLabel() {
expect(error).assertFail();
});
Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME, (error, data) => {
expect(error).assertEqual(0);
expect(error).assertNull();
expect(data).assertEqual("entry_MainAbility");
done();
});
......@@ -66,7 +66,7 @@ export default function getAbilityLabel() {
let timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0200]', timeOldStamp, timeNewStamp);
expect(data).assertEqual("bmsfirstright");
expect(error).assertEqual(0);
expect(error).assertNull();
done();
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册