Skip to content

Commit

Permalink
Add warning to browser recipe (#1355)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds authored and novemberborn committed Apr 12, 2017
1 parent 4cc3403 commit c01ac05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/recipes/browser-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This recipe works for any library that needs a mocked browser environment.

## Install browser-env

> **鉂楋笍 Important note**
>
>`browser-env` adds properties from the `jsdom` window namespace to the Node.js global namespace. This is explicitly [recommended against](https://github.com/tmpvar/jsdom/wiki/Don't-stuff-jsdom-globals-onto-the-Node-global) by `jsdom`. Please read through the linked wiki page and make sure you understand the caveats. If you don't have lots of dependencies that also require a browser environment then [`window`](https://github.com/lukechilds/window#universal-testing-pattern) may be a better solution.
Install [browser-env](https://github.com/lukechilds/browser-env).

> Simulates a global browser environment using jsdom.
Expand Down

0 comments on commit c01ac05

Please sign in to comment.