-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Jsdom does not properly simulate the browser environment #3770
Comments
Start a new pull request in StackBlitz Codeflow. |
We have to provide |
understood,but how do i test the func to get the actual browser environment |
Run tests in the browser 😄 Vitest has experimental support: https://vitest.dev/guide/browser.html |
OK,thanks,i will try it |
Describe the bug
when use Object.prototype.toString to get the type of window and process.
The result:
but in the real browser environment,it sound be window and undefined.
It's there any methods to handle this problem right now?
Reproduction
demo:https://stackblitz.com/edit/vitest-dev-vitest-iyikma?file=test%2Fexample.test.ts
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: