             brackets.pop()
 
       wasStarted = false
-      c.network.on 'start', ->
-        chai.expect(wasStarted).to.equal false
-        wasStarted = true
-      c.network.on 'end', ->
-        chai.expect(wasStarted).to.equal true
-        chai.expect(received).to.eql expected
-        done()
-
-
-      in2.post new noflo.IP 'data', 'two',
-        scope: 'x'
-      in1.post new noflo.IP 'openBracket', 1,
-        scope: 'x'
-      in1.post new noflo.IP 'data', 'one',
-        scope: 'x'
-      in1.post new noflo.IP 'closeBracket', 1,
-        scope: 'x'
+      checkStart = ->
+        chai.expect(wasStarted).to.equal false
+        wasStarted = true
+      checkEnd = ->
+        chai.expect(wasStarted).to.equal true
+        chai.expect(received).to.eql expected
+        c.network.removeListener 'start', checkStart
+        c.network.removeListener 'end', checkEnd
+        done()
+      c.network.on 'start', checkStart
+      c.network.once 'end', checkEnd
+
+      c.start (err) ->
+        return done err if err
+        in2.post new noflo.IP 'data', 'two',
+          scope: 'x'
+        in1.post new noflo.IP 'openBracket', 1,
+          scope: 'x'
+        in1.post new noflo.IP 'data', 'one',
+          scope: 'x'
+        in1.post new noflo.IP 'closeBracket', 1,
+          scope: 'x'

        received.push 'DISC'

      wasStarted = false
      c.network.on 'start', ->
        chai.expect(wasStarted).to.equal false
        wasStarted = true
      c.network.on 'end', ->
        chai.expect(wasStarted).to.equal true
        chai.expect(received).to.eql expected
        done()

      in2.connect()
      in2.send 'foo'
      in2.disconnect()
      in1.connect()
      in1.beginGroup 1
      in1.beginGroup 'a'
      in1.send 'baz'
      in1.endGroup()
      in1.endGroup()
      in1.disconnect()
    it 'should forward new-style brackets as expected regardless of sending order', (done) ->
      expected = [
        'CONN'

    beforeEach ->
      out = noflo.internalSocket.createSocket()
      c.outPorts.out.attach out
    afterEach (done) ->
      c.outPorts.out.detach out
      out = null
      c.shutdown done

    it 'should forward old-style groups as expected', (done) ->
      expected = [
