diff options
author | Cui Yan <yanx.cui@intel.com> | 2017-03-25 06:36:27 +0800 |
---|---|---|
committer | Geoff Gustafson <geoff@linux.intel.com> | 2017-03-24 15:36:27 -0700 |
commit | 133540c662ed5ac84c42c4d89ad2523ab5f31abc (patch) | |
tree | b47c9f1d16038386cb6c20ba03c1f5fd54c7c347 | |
parent | b878c0b3b4b4344b0fcca5a3416b19e584be1694 (diff) |
[tests] Update test sensor module to add 'unconnected' state (#887)
-rw-r--r-- | modules/GenericSensor.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/GenericSensor.js b/modules/GenericSensor.js index 12e688a..ec59e61 100644 --- a/modules/GenericSensor.js +++ b/modules/GenericSensor.js @@ -67,6 +67,11 @@ function GenericSensor() { currentState = sensor.state; defaultState = sensor.state; + assert(typeof currentState === "string" && currentState !== null, + "sensor: current state as '" + currentState + "'"); + + console.log("currentstate: " + currentState); + middleState = sensor.state; sensor.state = middleState + "love"; assert(sensor.state === middleState, @@ -163,9 +168,11 @@ function GenericSensor() { stopState === "idle" && startState === "activated", "sensor: be stopped"); + }, 20000); + setTimeout(function() { result(); - }, 20000); + }, 25000); } return genericSensor; |