Skip to content

Commit

Permalink
Merge pull request #1043 from silvenon/docs-mount
Browse files Browse the repository at this point in the history
Add note that mount() requires cleanup
  • Loading branch information
lelandrichardson authored Sep 16, 2017
2 parents 9f08ad4 + 2292b9a commit 10b9234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ want to run your tests inside of a browser, the recommended approach to using `m
on a library called [jsdom](https://github.com/tmpvar/jsdom) which is essentially a headless browser
implemented completely in JS.

**Note**: unlike shallow or static rendering, full rendering actually mounts the component in the DOM, which means that tests can affect each other if they are all using the same DOM. Keep that in mind while writing your tests and, if necessary, use [`.unmount()`](ReactWrapper/unmount.md) or something similar as cleanup.

```jsx
import { mount } from 'enzyme';
import sinon from 'sinon';
Expand Down

0 comments on commit 10b9234

Please sign in to comment.