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

Context not specified when testing #453

Closed
jakemmarsh opened this issue Nov 6, 2014 · 1 comment
Closed

Context not specified when testing #453

jakemmarsh opened this issue Nov 6, 2014 · 1 comment

Comments

@jakemmarsh
Copy link

I'm using Gulp and Karma to test my React application. I'm trying to render a single document with TestUtils.renderIntoDocument, which is working correctly. However, the component uses the Navigation mixin, and also has <Link /> components. That's resulting in these warnings/errors, and causing the test(s) to fail:

Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `makePath` was not specified in `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `makeHref` was not specified in `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `transitionTo` was not specified in `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `replaceWith` was not specified in `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `goBack` was not specified in `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `activeRoutes` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `activeParams` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `activeQuery` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `isActive` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `makePath` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `makeHref` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `transitionTo` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `replaceWith` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secWARN: 'Warning: Required context `goBack` was not specified in `Link`. Check the render method of `Header`.'
Chrome 38.0.2125 (Mac OS X 10.10.0): Executed 0 of 1 SUCCESS (0 secs / 0 secChrome 38.0.2125 (Mac OS X 10.10.0) Header should exist FAILED
    TypeError: undefined is not a function
        at Navigation.makeHref (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:22367:25 <- node_modules/react-router/modules/mixins/Navigation.js:29:0)
        at React.createClass.getHref (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:21111:17 <- node_modules/react-router/modules/components/Link.js:76:0)
        at React.createClass.render (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:21132:18 <- node_modules/react-router/modules/components/Link.js:97:0)
        at null.<anonymous> (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:31608:34 <- node_modules/react/lib/ReactCompositeComponent.js:1261:0)
        at wrapper [as _renderValidatedComponent] (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:37510:21 <- node_modules/react/lib/ReactPerf.js:51:0)
        at null.<anonymous> (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:31150:14 <- node_modules/react/lib/ReactCompositeComponent.js:803:0)
        at wrapper [as mountComponent] (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:37510:21 <- node_modules/react/lib/ReactPerf.js:51:0)
        at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:36964:42 <- node_modules/react/lib/ReactMultiChild.js:195:0)
        at ReactDOMComponent.Mixin._createContentMarkup (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:32392:32 <- node_modules/react/lib/ReactDOMComponent.js:261:0)
        at ReactDOMComponent.<anonymous> (/var/folders/dm/qhnpyjhj6ns3t89mpn3k0vc00000gn/T/0bf548d74daf62445f8b08e0939f0e219c961095.browserify:32314:14 <- node_modules/react/lib/ReactDOMComponent.js:183:0)
@ryanflorence
Copy link
Member

#437

@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