           unless noflo.isBrowser()
             workingSource = workingSource.replace "'noflo'", "'../src/lib/NoFlo'"
           l.setSource 'foo', 'RepeatData', workingSource, 'javascript', (err) ->
-            return done err if err
+            if err
+              done err
+              return
             done()
+            return
+          return
         it 'should be a loadable component', (done) ->
           l.load 'foo/RepeatData', (err, inst) ->
-            return done err if err
+            if err
+              done err
+              return
             chai.expect(inst).to.be.an 'object'
             chai.expect(inst.inPorts).to.contain.keys ['in']
             chai.expect(inst.outPorts).to.contain.keys ['out']

          unless noflo.isBrowser()
            workingSource = workingSource.replace "'noflo'", "'../src/lib/NoFlo'"
          l.setSource 'foo', 'RepeatDataCoffee', workingSource, 'coffeescript', (err) ->
            return done err if err
            done()
        it 'should be a loadable component', (done) ->
          l.load 'foo/RepeatDataCoffee', (err, inst) ->
            return done err if err
            chai.expect(inst).to.be.an 'object'
            chai.expect(inst.inPorts).to.contain.keys ['in']
            chai.expect(inst.outPorts).to.contain.keys ['out']

            chai.expect(err).to.be.an 'error'
            chai.expect(err.message).to.contain 'runnable component'
            done()
            return
          return
        it 'should not be a loadable component', (done) ->
          l.load 'foo/NotWorking', (err, inst) ->
            chai.expect(err).to.be.an 'error'
            chai.expect(inst).to.be.an 'undefined'
            done()
            return
          return
        return
      describe 'with non-existing import', ->
        nonWorkingSource = """
        var noflo = require('noflo');
