From 9c247f4f2659ee6ebbbffb4d394acb23b8b8de78 Mon Sep 17 00:00:00 2001 From: liuhaonan2 Date: Fri, 20 Jan 2023 15:32:04 +0800 Subject: [PATCH] Signed-off-by: liuhaonan2 --- .../js/test/device_status_unittest.test.js | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/msdp/device_status/src/main/js/test/device_status_unittest.test.js b/msdp/device_status/src/main/js/test/device_status_unittest.test.js index a382db55b..6e00e2ae6 100644 --- a/msdp/device_status/src/main/js/test/device_status_unittest.test.js +++ b/msdp/device_status/src/main/js/test/device_status_unittest.test.js @@ -31,7 +31,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_001 start"); try { stationary.on("still", ActivityEvent.ENTER_EXIT, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -51,7 +51,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_002 start"); try { stationary.off("still", ActivityEvent.ENTER_EXIT, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -71,7 +71,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_003 start"); try { stationary.once("still", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -90,7 +90,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_004 start"); try { stationary.on("fineStill", ActivityEvent.ENTER_EXIT, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -109,7 +109,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_005 start"); try { stationary.off("fineStill", ActivityEvent.ENTER_EXIT, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -128,7 +128,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_006 start"); try { stationary.once("fineStill", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -147,7 +147,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_007 start"); try { stationary.on("carBluetooth", ActivityEvent.ENTER_EXIT, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -166,7 +166,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_008 start"); try { stationary.off("carBluetooth", ActivityEvent.ENTER_EXIT, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -185,7 +185,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_009 start"); try { stationary.once("carBluetooth", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -204,7 +204,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_010 start"); try { stationary.on("Type_Unknow", ActivityEvent.ENTER_EXIT, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -223,7 +223,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_011 start"); try { stationary.off("Type_Unknow", ActivityEvent.ENTER_EXIT, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -242,7 +242,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_012 start"); try { stationary.once("Type_Unknow", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -261,7 +261,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_013 start"); try { stationary.on("highStill", ActivityEvent.ENTER, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -280,7 +280,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_014 start"); try { stationary.off("highStill", ActivityEvent.ENTER, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -299,7 +299,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_015 start"); try { stationary.once("highStill", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -318,7 +318,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_016 start"); try { stationary.on("fineStill", ActivityEvent.ENTER, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -337,7 +337,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_017 start"); try { stationary.off("fineStill", ActivityEvent.ENTER, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -356,7 +356,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_018 start"); try { stationary.once("fineStill", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -375,7 +375,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_019 start"); try { stationary.on("carBluetooth", ActivityEvent.ENTER, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -394,7 +394,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_020 start"); try { stationary.off("carBluetooth", ActivityEvent.ENTER, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -413,7 +413,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_021 start"); try { stationary.once("carBluetooth", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -432,7 +432,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_022 start"); try { stationary.on("Type_Unknow", ActivityEvent.ENTER, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -451,7 +451,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_023 start"); try { stationary.off("Type_Unknow", ActivityEvent.ENTER, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -470,7 +470,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_024 start"); try { stationary.once("Type_Unknow", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -489,7 +489,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_025 start"); try { stationary.on("relativeStill", ActivityEvent.ENTER, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -509,7 +509,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_026 start"); try { stationary.off("relativeStill", ActivityEvent.ENTER, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -529,7 +529,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_027 start"); try { stationary.once("relativeStill", (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -548,7 +548,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_028 start"); try { stationary.on("relativeStill", ActivityEvent.EXIT, 1, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { @@ -568,7 +568,7 @@ describe('DeviceStatusUnitTest', function () { console.log("msdp_test_devices_status_029 start"); try { stationary.off("relativeStill", ActivityEvent.EXIT, (data) => { - expect(data.state == -1).assertTrue(); + expect(data.value == -1).assertTrue(); done(); }) } catch (error) { -- GitLab