     # defer adding the then callback so it'll be called after whatever is attached after the return
     _.defer -> promise.then ->
       React.unmountComponentAtNode(root)
+      CURRENT_ROUTER_PARAMS = {}
       return arguments
     promise
 


  renderComponent: (component, options = {}) ->
    options.props ||= {}
    root = document.createElement('div')
    promise = new Promise( (resolve, reject) ->
      props = _.clone(options.props)

{commonActions} = require './utilities'
sandbox = null
ROUTER = null
CURRENT_ROUTER_PARAMS = null
# Mock a router for the context
beforeEach ->
  sandbox = sinon.sandbox.create()
  ROUTER  = sandbox.spy()
  ROUTER.makeHref = sandbox.spy()
  ROUTER.transitionTo = sandbox.spy()
  ROUTER.getCurrentParams = sandbox.spy( -> CURRENT_ROUTER_PARAMS )
afterEach ->
  sandbox.restore()

