```coffeescript
noflo = require 'noflo'
unless noflo.isBrowser()
  chai = require 'chai' unless chai
  ReadFile = require '../components/ReadFile.coffee'
else
  ReadFile = require 'noflo-browserfile/components/ReadFile.js'

describe 'ReadFile component', ->
  c = null
  ins = null
  out = null
  beforeEach ->
    c = ReadFile.getComponent()
    ins = noflo.internalSocket.createSocket()
    out = noflo.internalSocket.createSocket()
    c.inPorts.in.attach ins
    c.outPorts.out.attach out

  describe 'when instantiated', ->
    it 'should have an input port', ->
      chai.expect(c.inPorts.in).to.be.an 'object'
    it 'should have an output port', ->
      chai.expect(c.outPorts.out).to.be.an 'object'
```

Use ComponentLoader to get instance
user
```coffeescript
noflo = require 'noflo'
unless noflo.isBrowser()
  chai = require 'chai'
  path = require 'path'
  baseDir = path.resolve __dirname, '../'
else
  baseDir = 'noflo-browserfile'

describe 'ReadFile component', ->
  c = null
  ins = null
  out = null
  before (done) ->
    @timeout 4000
    loader = new noflo.ComponentLoader baseDir
    loader.load 'browserfile/ReadFile', (err, instance) ->
      return done err if err
      c = instance
      ins = noflo.internalSocket.createSocket()
      c.inPorts.file.attach ins
      done()
  beforeEach ->
    out = noflo.internalSocket.createSocket()
    c.outPorts.out.attach out
  afterEach ->
    c.outPorts.out.detach out

  describe 'when instantiated', ->
    it 'should have an file port', ->
      chai.expect(c.inPorts.file).to.be.an 'object'
    it 'should have an output port', ->
      chai.expect(c.outPorts.out).to.be.an 'object'
```
assistant