提交 c15e635a 编写于 作者: Z zhuqingxi

fixed ec0167cf from https://gitee.com/zhuqingxi/xts_acts/pulls/862

Sync hiappevent testcase
Signed-off-by: Nzhuqingxi <zhuqingxi@huawei.com>
上级 57b6e724
...@@ -574,6 +574,22 @@ describe('HiAppEventApiTest', function () { ...@@ -574,6 +574,22 @@ describe('HiAppEventApiTest', function () {
done(); done();
} }
}); });
HiAppEvent.write(HiAppEvent.Event.DISTRIBUTED_SERVICE_START, HiAppEvent.EventType.BEHAVIOR,
{[HiAppEvent.Param.USER_ID]: 'distributedservicestart', [HiAppEvent.Param.DISTRIBUTED_SERVICE_NAME]: 'HiAppEvent',
[HiAppEvent.Param.DISTRIBUTED_SERVICE_INSTANCE_ID]: 100},
(err, value) => {
console.log('HiAppEvent into json-callback');
if (err) {
console.error('HiAppEvent json-callback-error code=${err.code}');
expect().assertFail();
done();
} else {
console.log('HiAppEvent json-callback-success value=${value}');
expect(value == 0).assertTrue();
done();
}
});
console.info('testHiAppEventApi25 end') console.info('testHiAppEventApi25 end')
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册