return testApp.request(mockHelper.load("audio_player_events/playback_finished.json")) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); }); }); return testApp.request(mockHelper.load("audio_player_events/playback_failed.json")) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); }); }); return testApp.request(mockHelper.load("audio_player_events/playback_nearly_finished.json")) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); }); }); return testApp.request(mockHelper.load("audio_player_events/playback_started.json")) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); }); }); return testApp.request(mockHelper.load("audio_player_events/playback_stopped.json")) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); }); });
return testApp.request(mockRequest) .should.eventually.be.fulfilled .and.not.have.deep.property("response.outputSpeech.type"); });
describe('basic errors', () => { it('should require rules as an argument', (done) => { expect(whitelister()) .to.eventually.be.rejectedWith(ArgumentError, 'rules is not an object or string') .and.notify(done); }); it('should require rules (an object or string) as first argument', (done) => { expect(whitelister(true)) .to.eventually.be.rejectedWith(ArgumentError, 'rules is not an object or string') .and.notify(done); }); });
it("should return a list of events for a popular coordinate (Brooklyn, NY)", function (done) { // Set timeout this.timeout(10000); var es = new EventSearch(); es.search({ "lat": 40.710803, "lng": -73.964040, "distance": 100, "accessToken": accessToken }).should.be.fulfilled.and.notify(done); });
it("should retrieve account informations WITH voting weight", () => { expect(client.account_info(WALLET_ADDRESS, false, true)) .to.eventually.contain('"frontier"') .and.to.eventually.contain('"open_block"') .and.to.eventually.contain('"representative_block"') .and.to.eventually.contain('"balance"') .and.to.eventually.contain('"modified_timestamp"') .and.to.eventually.contain('"block_count"') .and.to.eventually.contain('"weight"') .notify(done); });
describe("RaiClient.account_balance()", done => { it("should retrieve account balance", () => { expect(client.account_balance(WALLET_ADDRESS)) .to.eventually.contain('"balance"') .and.to.eventually.contain('"pending"') .notify(done); }); });
it('should not change the channel number if not connected', function (done) { ourBoard = new OpenBCICyton({ verbose: true, simulate: true, simulatorFirmwareVersion: 'v2' }); ourBoard.radioChannelGet().should.be.rejected.and.notify(done); });
it('can disable simulator', function (done) { ourBoard = new Cyton({ verbose: true, simulate: true }); ourBoard.simulatorDisable().should.be.fulfilled.and.notify(done); });
it("should return an error if no Access Token is present", function (done) { var es = new EventSearch(); es.search({ "lat": 40.710803, "lng": -73.964040, "distance": 100 }).should.be.rejectedWith({ "message": "Please specify the lat and lng parameters!", "code": 1 }).and.notify(done); });
it('should not change the channel number if not connected', function (done) { ourBoard = new OpenBCICyton({ verbose: true, simulate: true, simulatorFirmwareVersion: 'v2' }); ourBoard.radioChannelSetHostOverride().should.be.rejected.and.notify(done); });
it('can enable simulator after constructor', function (done) { ourBoard = new Cyton({ verbose: true }); ourBoard.simulatorEnable().should.be.fulfilled.and.notify(done); });
it('should not change the channel number if not connected', function (done) { ourBoard = new OpenBCICyton({ verbose: true, simulate: true, simulatorFirmwareVersion: 'v2' }); ourBoard.radioPollTimeSet().should.be.rejected.and.notify(done); });
it('should not disable simulator if not in simulate mode', function (done) { ourBoard = new Cyton({ verbose: true }); ourBoard.simulatorDisable().should.be.rejected.and.notify(done); });
it("should work applying the 'venueDistance' sort parameter", function (done) { // Set timeout this.timeout(10000); var es = new EventSearch(); es.search({ "lat": 40.710803, "lng": -73.964040, "distance": 100, "accessToken": accessToken, "sort": "venueDistance" }).should.be.fulfilled.and.notify(done); });
it("should work applying the 'eventDistance' sort parameter", function (done) { // Set timeout this.timeout(10000); var es = new EventSearch(); es.search({ "lat": 40.710803, "lng": -73.964040, "distance": 100, "accessToken": accessToken, "sort": "eventDistance" }).should.be.fulfilled.and.notify(done); });