Skip to content

Stop document.createElement in tests #1250

Closed
@zpao

Description

@zpao

We have a ton of places that do

var container = document.createElement('div');
var component = <Something />;
var instance = React.renderComponent(component, container);

We should just be doing

var component = <Something />;
var instance = ReactTestUtils.renderIntoDocument(component);

This isn't an exciting task, but gets you exposed to lots of tests which can help with understanding react core better. cc @kmeht

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