edge/pkg/module/cast/testdata/cast.js

22 lines
429 B
JavaScript

cast.refreshDevices('5s')
.then(function(devices) {
console.log(devices)
if (devices === null) {
throw new Error("devices should not be null");
}
if (devices.length === 0) {
throw new Error("devices.length should not be 0");
}
return devices
})
.then(function(devices) {
return cast.getStatus(devices[0].uuid)
})
.then(function(status) {
console.log(status)
})