   ROUTER.transitionTo = sandbox.spy()
 
 afterEach ->
-  for comp in RENDERED
-    dom = React.findDOMNode(comp)
-    React.unmountComponentAtNode(dom) if dom
   sandbox.restore()
 
 # A wrapper component to setup the router context


  renderComponent: (component, options) ->
    options.props ||= {}
    new Promise (resolve, reject) ->
      props = _.clone(options.props)
      props._wrapped_component = component
      wrapper = ReactTestUtils.renderIntoDocument React.createElement(Wrapper, props)
      RENDERED.push(wrapper)
      resolve(
        wrapper,
        element: wrapper.refs.element,
        dom: React.findDOMNode(wrapper.refs.element)
      )

  actions: commonActions


ROUTER = null
RENDERED = []

{TransitionAssistant} = require '../../../src/components/unsaved-state-mixin'

# Mock a router for the context
beforeEach ->
  RENDERED = []
