Closed
Description
Describe the feature you'd like:
Right now we have to call cleanup
before each test. This tends to be confusing for beginners especially if they come from other libraries (Enzyme) that do not need this step. It would be good if render
could call cleanup
automatically.
Suggested implementation:
I didn't dig into the code too much but it should be as easy as having render
call cleanup
as the first thing it does.
Describe alternatives you've considered:
I'm trying to think about a use-case where you might want to run two render
s in the same test or where you might want to manually run cleanup
—which would invalidate this idea—but can't come up with anything.
Teachability, Documentation, Adoption, Migration Strategy:
We would have to remove the documentation about cleanup
. Potentially we would have to introduce a breaking change.