Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You cannot use <TestLocation> without a DOM" #692

Closed
mikew opened this issue Jan 15, 2015 · 1 comment
Closed

"You cannot use <TestLocation> without a DOM" #692

mikew opened this issue Jan 15, 2015 · 1 comment

Comments

@mikew
Copy link

mikew commented Jan 15, 2015

Trying to test the router using jasmine-node and this error seems to fly in the face of the description of TestComponent:

A location that is convenient for testing and does not require a DOM

Here's the whole contents of the test case

var Router = require('react-router')
var TestLocation = require('react-router/modules/locations/TestLocation')

describe('Integration', () => {
  it('works', () => {
    var routes = []
    var router

    TestLocation.history = ['/baz']

    router = Router.create({
      routes,
      location: TestLocation
    })

    router.run((Handler) => {
      console.log(Handler)
    })
  })
})
@mjackson
Copy link
Member

Eh, hmm. Ya, that's definitely not supposed to happen. I'll take a look.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants