       input = '1x1.gif'
       id = null
       colors.once "data", (colors) ->
-        chai.expect(colors).to.be.an 'array'
         chai.expect(colors).to.have.length 0
         done()
-      id = getCanvasWithImage input, (canvas) ->
+      id = testutils.getCanvasWithImage input, (canvas) ->
         ins.send canvas
   describe 'when given not an image', ->
     it 'should return an error', (done) ->
       error.on "data", (err) ->
-        chai.expect(err).to.be.an 'object'
+        chai.expect(err).to.be.instanceof Error
         done()
       ins.send ''
   describe 'when given null', ->
     it 'should return an error', (done) ->
       error.on "data", (err) ->
-        chai.expect(err).to.be.an 'object'
+        chai.expect(err).to.be.instanceof Error
         done()
       ins.send null

  colors = null
  canvas = null
  error = null
  beforeEach ->
    c = GetColors.getComponent()
    ins = noflo.internalSocket.createSocket()
    colors = noflo.internalSocket.createSocket()
    canvas = noflo.internalSocket.createSocket()
    error = noflo.internalSocket.createSocket()
    c.inPorts.canvas.attach ins
    c.outPorts.colors.attach colors
    c.outPorts.canvas.attach canvas
    c.outPorts.error.attach error

  describe 'when instantiated', ->
    it 'should have a input ports', ->

    ]
    it 'should extract the colors and output css strings', (done) ->
      colors.once "data", (colors) ->
        chai.expect(colors).to.have.length expected.length
        chai.expect(colors).to.deep.equal expected
        done()
      id = testutils.getCanvasWithImageNoShift input, (canvas) ->
        ins.beginGroup id
        ins.send canvas
        ins.endGroup()
