未验证 提交 4c904d9d 编写于 作者: O openharmony_ci 提交者: Gitee

!5833 add usb businesserror case

Merge pull request !5833 from 吴成文/master
......@@ -97,5 +97,21 @@ describe('UsbFunctionsJsFunctionsTest', function () {
console.info('usb SUB_USB_JS_0340 : PASS');
})
/**
* @tc.number : SUB_USB_JS_1000
* @tc.name : getCurrentFunctions
* @tc.desc : 反向测试 获取当前设备模式
*/
it('SUB_USB_JS_1000', 0, function () {
console.info('usb SUB_USB_JS_1000 begin');
try {
var maskCode = usb.getCurrentFunctions("invalid");
console.info('usb case getCurrentFunctions return: ' + maskCode);
} catch (err) {
console.info('catch err code: ' + err.code + ' message: ' + err.message);
expect(err.code).assertEqual(401);
console.info('usb SUB_USB_JS_1000 : PASS');
}
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册