describe('constructor', () => { it('should assign config values to member variables', () => { const homebridge = dummyHomebridge(dummyConfig); const device = dummyConfig.devices[0]; const dummyURL = 'https://some.random.url.com/'; const dummyAccessToken = 'MY_top_SECRET_access_TOKEN'; const Service = homebridge.hap.Service; const Characteristic = homebridge.hap.Characteristic; const accessory = new ActorAccessory( () => {}, dummyURL, dummyAccessToken, device, homebridge, Service.Lightbulb, Characteristic.On ); accessory.url.should.be.equal(dummyURL); accessory.accessToken.should.be.equal(dummyAccessToken); accessory.deviceId.should.be.equal(device.device_id); accessory.services.should.have.length(2); accessory.services[1].should.be.an.instanceOf(Service.Lightbulb); }); });