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

Having some bother testing a component that contains a link. #609

Closed
Dakuan opened this issue Dec 15, 2014 · 3 comments
Closed

Having some bother testing a component that contains a link. #609

Dakuan opened this issue Dec 15, 2014 · 3 comments

Comments

@Dakuan
Copy link

Dakuan commented Dec 15, 2014

when I do this:

var instance = TestUtils.renderIntoDocument(<ProjectsIndexPage flux={flux} />);

I get this:

WARN: 'Warning: Required context `makePath` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `makeHref` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `transitionTo` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `replaceWith` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `goBack` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `getCurrentPath` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `getCurrentRoutes` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `getCurrentPathname` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `getCurrentParams` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `getCurrentQuery` was not specified in `Link`. Check the render method of `Sidebar`.'
WARN: 'Warning: Required context `isActive` was not specified in `Link`. Check the render method of `Sidebar`.'
PhantomJS 1.9.8 (Mac OS X) ProjectsIndexPage when the projects are loading should display the loading spinner FAILED
    TypeError: 'undefined' is not a function (evaluating 'this.context.makeHref(to, params, query)')

Removing the <Link/> components makes the error go away

@bobeagan
Copy link
Contributor

See #437

@fredrick
Copy link

+1

@ryanflorence
Copy link
Member

yeah, check out #437, I'm going to add some test helpers soon.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 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

4 participants