-_ = require 'underscore'
+defer = require 'lodash/defer'
+merge = require 'lodash/merge'
 
 EmptyFn = ->
   return undefined

      setItem: sinon.stub()
    @history =
      pushState: sinon.spy()


module.exports = FakeWindow

  scroll: (x, y) ->
    @pageXOffset = x
    @pageYOffset = y
  requestAnimationFrame: (cb) -> defer(cb)
  querySelector: (sb) -> null
  location:
    pathname: '/'
    search: ''
  constructor: (attrs = {}) ->
    for method in _.functions(@)
      sinon.spy(@, method)
    @localStorage =
