Skip to content

Provide a testInstance.context property to facilitate context testing #13382

@jsmrcaga

Description

@jsmrcaga

Do you want to request a feature or report a bug?
Feature Request

What is the current behavior?
testInstance provides a props property, but does not provide a context property allowing for context tests.

What is the expected behavior?
testInstance.context should return an object containing the instance's current context

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
At least 16.4.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions