svelte icon indicating copy to clipboard operation
svelte copied to clipboard

chore: upgrade vitest

Open gtm-nayan opened this issue 11 months ago • 5 comments

renovate won't do it because semver

Before submitting the PR, please make sure you do the following

  • [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • [ ] Prefix your PR title with feat:, fix:, chore:, or docs:.
  • [ ] This message body should clearly illustrate what problems it solves.
  • [ ] Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • [ ] Run the tests with pnpm test and lint the project with pnpm lint

gtm-nayan avatar Jul 08 '23 09:07 gtm-nayan

Is there any way to avoid the two simultaneous versions of esbuild this gives us?

Conduitry avatar Jul 08 '23 13:07 Conduitry

vite 4.4 uses 0.18 , latest vitest should too. pnpm dedupe could do, otherwise adding an override to package.json, but overriding it risks breaking something.

dominikg avatar Jul 08 '23 14:07 dominikg

We just need to merge https://github.com/sveltejs/kit/pull/10330 and then update to the latest adapter-vercel in the sites directory here. Anyone want to give https://github.com/sveltejs/kit/pull/10330 an approval? :wink:

benmccann avatar Jul 08 '23 16:07 benmccann

It looks like happy-dom 9.20.3 is being used by vitest even before this PR, which means you should be able to address this TODO now:

https://github.com/sveltejs/svelte/blob/02099d9d75ca561e96f637d04c3619d73139947a/packages/svelte/test/hydration/hydration.test.js#L2

Mind sneaking a fix for that into this PR?

benmccann avatar Jul 10 '23 00:07 benmccann

Looks like happy-dom has a few more bugs, just removed the todo for now. It's a small suite so we won't get much difference in speed either.

gtm-nayan avatar Jul 10 '23 02:07 gtm-nayan