提交 282c0806 编写于 作者: 风林火山

增加电池在位判断接口测试

Signed-off-by: N风林火山 <liangqihang@huawei.com>
上级 c6bf0419
...@@ -264,4 +264,19 @@ describe('appInfoTest', function () { ...@@ -264,4 +264,19 @@ describe('appInfoTest', function () {
brightness.setValue(255); brightness.setValue(255);
expect(0 == 0).assertTrue(); expect(0 == 0).assertTrue();
}) })
})
/**
* @tc.number battery_manager_js_2300
* @tc.name is_battery_present_test
* @tc.desc Battry Present Interface Test
*/
it('is_battery_present_test', 0, function () {
var isBatteryPresent = batteryInfo.isBatteryPresent;
console.info('isBatteryPresent = ' + isBatteryPresent);
if (isBatteryPresent) {
expect(isBatteryPresent).assertTrue();
}else{
expect(isBatteryPresent).assertFalse();
}
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册