       g.send file
       chai.expect(c.ready).to.be.false
     it 'should expose available ports', (done) ->
-      c.baseDir = root
-      @timeout 6000
+      @timeout 6000
+      c.baseDir = root
       c.once 'ready', ->
         chai.expect(c.inPorts.ports).to.have.keys [
           'graph'

    file = "#{urlPrefix}spec/fixtures/subgraph_legacy.fbp"
    it 'should emit a ready event after network has been loaded', (done) ->
      @timeout 6000
      c.once 'ready', ->
        chai.expect(c.network).not.to.be.null
        chai.expect(c.ready).to.be.true

    file = "#{urlPrefix}spec/fixtures/subgraph.fbp"
    it 'should emit a ready event after network has been loaded', (done) ->
      @timeout 6000
      c.baseDir = root
      c.once 'ready', ->
        chai.expect(c.network).not.to.be.null
        chai.expect(c.ready).to.be.true
