 
     describe 'Component Protocol', ->
       before ->
+        chai.expect(connection, 'Connection needs to be available').not.be.a 'null'
         chai.expect(capabilities, 'Component protocol should be allowed for connection').to.contain 'protocol:component'
       describe 'on requesting a component list', ->
         it 'should receive some known components', (done) ->

            done()
          client.on 'connectFailed', (err) ->
            tries--
            chai.expect(tries).to.be.above 0
            setTimeout(
              ->
                client.connect address, 'noflo'

    describe 'Network Protocol', ->
      # Set up a clean graph
      before (done) ->
        chai.expect(connection, 'Connection needs to be available').not.be.a 'null'
        chai.expect(capabilities, 'Network protocol should be allowed for user').to.contain 'protocol:network'
        waitFor = 5  # set this to the number of commands below
        listener = (message) ->
