Skip to content

Commit

Permalink
Add note that mount() requires cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
silvenon committed Jul 24, 2017
1 parent 769a248 commit 2292b9a
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 2292b9a

Please sign in to comment.