Skip to content

Add support for passing context #49

@laurakelly

Description

@laurakelly

I have a component in my app that has a router passed to it via context:

const contextTypes = { router: React.PropTypes.func.isRequired, };

Reagent tests currently do not support passing in a context and will throw this error:

Error: expected zero console.warn calls, got 1:
      warn(Warning: Failed Context Types: Required context `router` was not specified in `MyComponent`.) at warning (node_modules/react/lib/warning.js:48:15)
    at Context.<anonymous> (spec/javascripts/_failTestsOnErrors.js:21:23)

It would be great to be able to pass context into shallow.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions