         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 [

        { key: 'b', val: 'bb', parent: 'object' },
        { key: 'c', val: 'cc', parent: 'object' },
      ]


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 =
