未验证 提交 2f56d30f 编写于 作者: O openharmony_ci 提交者: Gitee

!3002 【Sensor】【Master】 SensorOnOffTest.test.js文件修改

Merge pull request !3002 from ldy/master
...@@ -78,17 +78,18 @@ describe('SystemParameterTest', function () { ...@@ -78,17 +78,18 @@ describe('SystemParameterTest', function () {
*/ */
it('SUB_SENSORS_Sensor_JSTest_0020', 0, async function (done) { it('SUB_SENSORS_Sensor_JSTest_0020', 0, async function (done) {
console.info('SUB_SENSORS_Sensor_JSTest_0020 start'); console.info('SUB_SENSORS_Sensor_JSTest_0020 start');
await sensor.on(testNullSensorId, function (data) { function onSensorCallback(data) {
if (data) { console.info('SensorJsTest002 on error');
console.info('testRegisterSensortest002 on success');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}); try {
setTimeout(() => { sensor.on(testNullSensorId, onSensorCallback);
} catch (error) {
console.info(error);
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}, 500) }
console.info('SUB_SENSORS_Sensor_JSTest_0020 end'); console.info('SUB_SENSORS_Sensor_JSTest_0020 end');
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册