         chai.expect(-> p.disconnect()).to.throw Error
 
     describe 'with attached socket', ->
-      s = new socket.InternalSocket
-      s2 = new socket.InternalSocket
+      s = new noflo.internalSocket.InternalSocket
+      s2 = new noflo.internalSocket.InternalSocket
       it 'should emit an event', (done) ->
         p.once 'attach', (sock) ->
           chai.expect(sock).to.equal s

    p = null
    describe 'initially', ->
      it 'should retain the given type', ->
        p = new port.Port 'string'
        chai.expect(p.type).to.equal 'string'
      it 'should not have a name', ->
        chai.expect(p.name).to.be.a 'null'

if typeof process isnt 'undefined' and process.execPath and process.execPath.match /node|iojs/
  chai = require 'chai' unless chai
  noflo = require '../src/lib/NoFlo.coffee'
else
  noflo = require 'noflo'

describe 'Legacy Port', ->

  describe 'Untyped port instance', ->
    it 'should be of type "all"', ->
      p = new noflo.Port
      chai.expect(p.type).to.equal 'all'
      chai.expect(p.getDataType()).to.equal 'all'

