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

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


module.exports = FakeWindow

defer = require 'lodash/defer'
merge = require 'lodash/merge'

EmptyFn = ->
  return undefined
