Skip to content

docs: Vitest doesn't need global-jsdom #1084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/dom-testing-library/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ the DOM and browser APIs that runs in node. If you're not using Jest and you
would like to run your tests in Node, then you must install jsdom yourself.
There's also a package called
[global-jsdom](https://github.com/modosc/global-jsdom) which can be used to
setup the global environment to simulate the browser APIs.
setup the global environment to simulate the browser APIs. Note that if you're using
Vitest you only need to configure [`environment`](https://vitest.dev/config/#environment)
to `jsdom` to achieve the same effect, you don't need global-jsdom.

First, install jsdom and global-jsdom.

Expand Down