提交 00bbdeca 编写于 作者: W wangtiantian

IssueNo: #I589JF:parse moduleName

Description: parse moduleName
Sig:SIG_ApplicaitonFramework
Feature or Bugfix:Bugfix
Binary Source:No
Signed-off-by: Nwangtiantian <wangtiantian19@huawei.com>
上级 2e41424f
...@@ -344,20 +344,23 @@ export default function actsBmsJsModuleNameTest() { ...@@ -344,20 +344,23 @@ export default function actsBmsJsModuleNameTest() {
abilityName: ABILITY_NAME, abilityName: ABILITY_NAME,
moduleName: MODULE_NAME1 moduleName: MODULE_NAME1
}, DEFAULT_FLAG, DEFAULT_USER_ID).then(data => { }, DEFAULT_FLAG, DEFAULT_USER_ID).then(data => {
expect(data).assertFail(); checkDataInfo(data[0]);
console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data));
}).catch(err => { }).catch(err => {
console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); console.info("[QueryAbilityByWant_0100]Operation failed. Err: " + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE); expect(err).assertFail();
}); });
bundle.queryAbilityByWant({ bundle.queryAbilityByWant({
bundleName: BUNDLE_NAME, bundleName: BUNDLE_NAME,
abilityName: ABILITY_NAME, abilityName: ABILITY_NAME,
moduleName: MODULE_NAME1 moduleName: MODULE_NAME1
}, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => { }, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => {
console.info("'[QueryAbilityByWant_0100]Return data " + JSON.stringify(data)); expect(err).assertEqual(SUCCESS_CODE);
expect(data).assertEqual("type mismatch"); if (err) {
console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE); }
checkDataInfo(data[0]);
console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data));
done(); done();
}); });
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册