提交 4441d6da 编写于 作者: W wu-chengwen

feature(usb):add businesserror case

Signed-off-by: Nwu-chengwen <wuchengwen4@huawei.com>
上级 290eb0be
......@@ -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.
先完成此消息的编辑!
想要评论请 注册