         b: 'bb'
         c: 'cc'
 
-      fn = (obj) ->
-        list = []
-        keyfinder obj, (key, val, parent) ->
-          obj =
-            key: key
-            val: val
-            parent: parent
-          list.push obj
-        list
-
       results = fn obj
       expect(results).to.have.length 3
       expect(results).to.eql [

      expect(keyfinder(true, 'predicate')).to.have.length 0


  describe 'keyfinder(object/array, [callback = "function"])', ->

    it 'should be able to pass function instead of string as second argument', ->
      expect(-> keyfinder {a: 'aa'}, ->).to.not.throw /error/


keyfinder = require '../lib/index'

describe 'keyfinder module', ->

  it 'module exports a single function\n', ->
    expect(keyfinder).to.be.a "function"

  describe 'keyfinder(object/array, "string")', ->

    it 'find key in single level object', ->
      obj =
