   fn3 = ->
   beforeEach ->
     chain = buildChain()
+
+  it 'shouldnt emit an add event for add() without args', ->
+    called = false
+    chain.on 'add', -> called = true
+    chain.add()
+    assert.equal called, false
 
   it 'should add single fn to array', ->
     chain.add fn1

  beforeEach ->
    chain = buildChain()

  it 'should have false result if chain is already enabled', ->

    results = chain.enable()

    assert.strictEqual chain.array[0], fn


  it 'with function as options should build chain w/one fn', ->
    fn = ->
    chain = buildChain fn
    assert chain, 'should return the chain'
    assert chain.array, 'should have an array'
    assert.equal chain?.array?.length, 1, 'should have fn in array'
    assert.strictEqual chain.array[0], fn


  it 'with 2 functions as options should build chain w/both fns', ->
    fn1 = ->
    fn2 = ->
    chain = buildChain fn1, fn2
    assert chain, 'should return the chain'
    assert chain.array, 'should have an array'
    assert.equal chain?.array?.length, 2, 'should have both in array'
    assert.strictEqual chain.array[0], fn1
    assert.strictEqual chain.array[1], fn2


  it 'with class instead of builder', ->
    chain = new buildChain.Chain array:[->]
    assert chain, 'should return the chain'
    assert chain.array, 'should have an array'
    assert.equal chain?.array?.length, 1, 'should have fn in array'
    assert.equal typeof(chain.array[0]), 'function'


  it 'with class and bad options', ->
    assert.throws ->
      chain = buildChain.Chain array:['bad']


  it 'with custom buildContext', ->
    fn = -> {}
    chain = buildChain buildContext:fn
    assert chain._originalBuildContext
    assert.equal chain._buildContext, fn


  it 'with nested array should be flattened', ->
    fn = ->
    chain = buildChain [ [fn] ]
    assert chain, 'should return the chain'
    assert chain.array, 'should have an array'
    assert.equal chain?.array?.length, 1, 'should have fn in array'
    assert.strictEqual chain.array[0], fn


  it 'with base and props options should be used', ->

    class Thing
      constructor: ->
      noop: -> 'noop'

    options =
      base : Thing.prototype
      props:
        value:
          configurable: false
          enumerable: true
          writable: false
          value: 'some value'

    chain = buildChain options

    assert chain, 'should return the chain'
    assert chain._base, options.base
    assert chain._props, options.props

    context = chain._buildContext()

    assert.equal context.noop(), 'noop'
    assert.equal context.value, 'some value'


# 2. chain.add()
describe 'test chain.add()', ->

