By default, `browser-env` will add all global browser variables to the Node.js global scope, creating a full browser environment. This should have good compatibility with most front-end libraries, however, it's generally not a good idea to create lots of global variables if you don't need to. If you know exactly which browser globals you need, you can pass an array of them.
```js
import browserEnv from 'browser-env';
browserEnv(['window', 'document', 'navigator']);
```
## Configure tests to use browser-env
Configure AVA to `require` the helper before every test file.
@ -47,7 +53,20 @@ Configure AVA to `require` the helper before every test file.
## Enjoy!
Write your tests and enjoy a mocked window object.
Write your tests and enjoy a mocked browser environment.