thing-it-device-ibeacon
Version:
[thing-it-node] Device Plugin for iBeacon Devices.
63 lines (52 loc) • 1.85 kB
JavaScript
var assert = require("assert");
describe('[thing-it] iBeacon', function () {
var testDriver;
before(function () {
testDriver = require("thing-it-test").createTestDriver({logLevel: 'debug'});
testDriver.registerDevicePlugin(__dirname + "/../iBeacon");
testDriver.registerDevicePlugin(__dirname + "/../beaconScanner");
});
describe('Start Configuration', function () {
this.timeout(60000);
it('should complete without error', function () {
testDriver.start({
configuration: require("../examples/configuration.js"),
heartbeat: 10
//simulated: true
});
testDriver.addListener({
publishDeviceStateChange: function (device) {
done();
}
});
});
});
//describe('iBeacon Discovery', function () {
// this.timeout(80000);
//
// before(function () {
// testDriver.removeAllListeners();
// });
// it('should produce Device Discovery message', function (done) {
// testDriver.addListener({
// publishDeviceRegistration: function (device) {
// done();
// }
// });
// });
//});
// describe('State Notification', function () {
// this.timeout(60000);
//
// before(function () {
// testDriver.removeAllListeners();
// });
// it('should produce Device State Change Message', function (done) {
// testDriver.addListener({
// publishDeviceStateChange: function (device) {
// done();
// }
// });
// });
// });
});