lukechilds / browser-env

Simulates a global browser environment using jsdom
MIT License
175 stars 14 forks source link

Expose the JSDOM instance #49

Closed avaly closed 7 years ago

avaly commented 7 years ago

In certain cases it's useful to have access to the JSDOM instance in order to reconfigure.

Example:

lukechilds commented 7 years ago

If you need a different environment in each test then you should probably be using window or just jsdom directly.

browserEnv is global so if you have tests running async then they're gonna be reconfiguring stuff for each other.