UNPKG

thing-it-device-ibeacon

Version:
76 lines (63 loc) 2.38 kB
var assert = require("assert"); describe('[thing-it] blueup', function () { var testDriver; var testDriver2; before(function () { testDriver = require("thing-it-test").createTestDriver({logLevel: "debug"}); //testDriver2 = require("thing-it-test").createTestDriver({logLevel: "debug"}); testDriver.registerDevicePlugin(__dirname + "/../beaconScanner"); //or deviceplugin name? // testDriver2.registerDevicePlugin(__dirname + "/../beaconScanner"); //or deviceplugin name? }); describe('Start Configuration', function () { this.timeout(60000); it('should complete without error', function () { testDriver.start({ configuration: require("../examples/configurationBlueUp1.js"), heartbeat: 10 //simulated: true }); // testDriver2.start({ // configuration: require("../examples/configurationBlueUp2.js"), // heartbeat: 10 // //simulated: true // }); testDriver.addListener({ publishDeviceStateChange: function (device) { done(); } }); // testDriver2.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(); // } // }); // }); // }); });