提交 373bce59 编写于 作者: Y yangziyong

fix: accpet undefined input

Signed-off-by: Nyangziyong <nsyangziyong@huawei.com>
上级 3675f0b0
......@@ -142,6 +142,31 @@ export default async function SystemDisplayTest() {
});
});
/**
* @tc.number system_display_js_0203
* @tc.name set_value_success_value
* @tc.desc Check undefined as input of setValue
*/
it('set_value_success_value', 0, async function (done) {
brightness.setKeepScreenOn({
keepScreenOn: true,
success: function () {
console.log('undefined: original:handling set keep screen on success.');
let value = brightness.getValue();
brightness.setValue(undefined);
expect(value == brightness.getValue()).assertTrue();
done();
},
fail: function (data, code) {
console.error('undefined: original:handling set keep screen on fail, code:' + code + ', data: ' + data);
done();
},
complete: function () {
console.error('undefined: original:handling set keep screen on complete.');
}
});
});
/**
* @tc.number system_display_js_0300
* @tc.name get_mode_success
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册