-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathtest.js
More file actions
23 lines (18 loc) · 587 Bytes
/
test.js
File metadata and controls
23 lines (18 loc) · 587 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
* OpenZWave test program.
*/
var OpenZWave = require('./lib/openzwave-shared.js');
// this test assumes no actual ZWave controller exists on the system
// and is just a rudimentary check that the driver can initialise itself.
var zwave = new OpenZWave()
console.log("OPENZWAVE VERSION:", zwave.getOzwVersion())
zwave.on('ping', function () {
console.log('driver is emitting events properly')
process.exit()
})
console.log('Testing if OZW is emitting events properly')
zwave.ping()
setTimeout(function () {
console.log('timeout pinging the driver')
process.exit(1)
}, 1000)