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
ci stuck #462
Comments
I probably have the same issue, although I use Windows 10 (21H2). Works fine with version 2.55.0, gets randomly stuck with 3.0.0. I also use vitest (0.10.2) for testing. To reproduce, create at least three test files like this:
Then run tests with "npx vitest". Press enter many times until it gets stuck. The more test cases or tests files there are, the sooner it will get stuck (probably takes less than 10 retries). My minimal vite.config.ts:
|
I have this same issue as well with My // package.json
"scripts": {
..
..
"coverage": "c8 --check-coverage --lines 80 --functions 100 pnpm test",
"test": "vitest run",
..
.. |
Thank you for reporting @woldtwerk, @tapioko and @dennismphil! 🙂 I believe that I have localized the problem. It is a bit problematic to fix as "Window" now is running as a as a VM context and Vitest is importing it and sets its keys in the global context. There is a new class called GlobalWindow, which is meant to be executed in the global context. It was not expected that Vitest imported Happy DOM this way and I wish I knew this before the major release was made. The change was done to solve multiple bugs/problems when running things with Happy DOM in a VM. To solve this either Vitest needs to import GlobalWindow and use it instead, or Happy DOM needs to change Window to be the global window and make a new class called VMWindow (or similar). |
It seems like Vitest will fix it on their side 🙂 |
…as caused by the import of the package "sync-request".
#462@patch: Fixes problem with Vitest hanging in some scenarios. It w…
@woldtwerk, @tapioko and @dennismphil apparently the problem was not what I thought, even though it might cause other problems. After some more debugging I found the problem. It was caused by the import of "sync-request". I have now made a fix. You can read more about the release here: |
Great to hear @woldtwerk! 🙂 |
I updated from ^2.55.0 to latest and this causes my github pipeline to get stuck after the tests are done. Oddly enough it works on windows. only linux and macos get stuck.
Am I overseeing something in the upgrade notes which can cause this?
I'm using vitest for testing.
link to repo:
https://github.com/ueberbit/lib
The text was updated successfully, but these errors were encountered: