Skip to content

Shallow Renderer should expose rendered component instance #4056

@jsdf

Description

@jsdf

Just as ReactMount.render returns the rendered component instance, it seems to me that ReactShallowRenderer.prototype.render should return the rendered component or expose it in some other way (maybe a getRenderedComponent method) so that when testing stateful components via shallow rendering, assertions can be made against the state of the component instance.

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