Skip to content
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

refactor: migrate to vitest #1092

Merged
merged 31 commits into from
Dec 28, 2021
Merged

refactor: migrate to vitest #1092

merged 31 commits into from
Dec 28, 2021

Conversation

antfu
Copy link
Member

@antfu antfu commented Dec 23, 2021

Thanks a lot to @JessicaSachs 🙌

@JessicaSachs
Copy link
Contributor

So I was getting an issue before I upgraded to 0.0.108 where those tests would fail. (the "tests magically work now" commit).

I think the upgrade to 0.0.108 made vitest fast enough that the race condition isn't apparent on my machine, but it still fails in CI (slower CPU, etc). All of the tests that are broken mock or other-wise reset window/DOM state. e.g. document.location, window.localStorage, window.navigator, document.body

To reproduce the failure, you must run all tests together. Most of the time I spent was trying to debug why those tests were failing. I couldn't figure it out. I think, environmentally, this environment isn't as pure/sandboxed as jest's jsdom resets.

@antfu antfu merged commit 3b9a7b4 into main Dec 28, 2021
@antfu antfu deleted the feat/vitest branch December 28, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants