           chai.expect(err).to.be.an 'error'
           chai.expect(err.message).to.contain 'No process defined for inbound node'
           done()
+          return
+        return
+      return
+    return
   describe 'baseDir setting', ->
     it 'should set baseDir based on given graph', ->
       g = new noflo.Graph
       g.baseDir = root
       n = new noflo.Network g
       chai.expect(n.baseDir).to.equal root
+      return
     it 'should fall back to CWD if graph has no baseDir', ->
-      return @skip() if noflo.isBrowser()
+      if noflo.isBrowser()
+        @skip()
+        return
       g = new noflo.Graph
       n = new noflo.Network g
       chai.expect(n.baseDir).to.equal process.cwd()
+      return
     it 'should set the baseDir for the component loader', ->
       g = new noflo.Graph
       g.baseDir = root
       n = new noflo.Network g
       chai.expect(n.baseDir).to.equal root
       chai.expect(n.loader.baseDir).to.equal root
+      return
+    return
   describe 'debug setting', ->
     n = null
     g = null

      process: (input, output) ->
        output.sendDone
          out: input.get 'in'
  Callback = ->
    new noflo.Component
      inPorts:
        in: datatype: 'all'
        callback:

        g.addEdge "Repeat#{n}", 'out', 'Callback', 'in'
      g.addInitial ->
        called++
        return
      , 'Callback', 'callback'
      for n in [0..10000]
        g.addInitial n, "Repeat#{n}", 'in'

      nw = new noflo.Network g
      nw.loader.listComponents (err) ->
        if err
          done err
          return
        nw.loader.components.Split = Split
        nw.loader.components.Callback = Callback
        nw.once 'end', ->
          chai.expect(called).to.equal 10001
          done()
          return
        nw.connect (err) ->
          if err
            done err
            return
          nw.start (err) ->
            if err
              done err
              return
            return
          return
        return
      return
    return

  describe 'with a faulty graph', ->
    loader = null
    before (done) ->
      loader = new noflo.ComponentLoader root
      loader.listComponents (err) ->
        if err
          done err
          return
        loader.components.Split = Split
        done()
        return
      return
    it 'should fail on connect with non-existing component', (done) ->
      g = new noflo.Graph
      g.addNode 'Repeat1', 'Baz'
