提交 dc33f114 编写于 作者: I inter515

修改代码长度

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 dd61eca2
......@@ -106,7 +106,8 @@ describe('ActsBundleManagerTest', function () {
* @tc.desc Test getBundleInfo interfaces with one hap.
*/
it('getBundleInfo_0600', 0, async function (done) {
await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES|demo.BundleFlag.GET_ABILITY_INFO_WITH_DISABLE , OnReceiveEvent);
await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES|
demo.BundleFlag.GET_ABILITY_INFO_WITH_DISABLE , OnReceiveEvent);
function OnReceiveEvent(err, datainfo) {
console.info("getBundleInfo_0600 dataInfo ====" + datainfo);
expect(datainfo.name).assertEqual(NAME1);
......@@ -233,7 +234,6 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
}
}
}
/**
......@@ -1103,6 +1103,14 @@ describe('ActsBundleManagerTest', function () {
await demo.queryAbilityByWant({
entities: ['entity.system.home', 'entitiesentities']
}, 4, userId).then(data => {
checkAbilityInfos(data);
done();
}).catch(err => {
expect(err).assertFail();
done();
})
})
function checkAbilityInfos(data) {
let queryResultCount = 0;
for (let i = 0, len = data.length; i < len; i++) {
let datainfo = data[i];
......@@ -1146,12 +1154,7 @@ describe('ActsBundleManagerTest', function () {
}
}
expect(queryResultCount).assertEqual(3);
done();
}).catch(err => {
expect(err).assertFail();
done();
})
})
}
/**
* @tc.number queryAbilityByWant_0400
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册