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

[Docs]: Documentation suggests the vite-jest library for vite compatibility, but vite-jest is obsolete and appears unmaintained. #15121

Open
Jon-Biz opened this issue Jun 11, 2024 · 4 comments

Comments

@Jon-Biz
Copy link

Jon-Biz commented Jun 11, 2024

Page(s)

The Vite section of the getting started page suggests the vite-jest library as a 'not fully supported' option for running jest test suites with vite projects. However, vite-jest requires a version of vite 3 major release versions behind the current iteration and appears unmaintained.

The relevant docs section:

https://jestjs.io/docs/getting-started#using-vite

Using Vite
Jest can be used in projects that use vite to serve source code over native ESM to provide some frontend tooling, vite is an opinionated tool and does offer some out-of-the box workflows. Jest is not fully supported by vite due to how the plugin system from vite works, but there are some working examples for first-class jest integration using vite-jest, since this is not fully supported, you might as well read the limitation of the vite-jest. Refer to the vite guide to get started.


vite-jest requires a peer dependencies of vite@"2.4.2" and jest@"^27.0.0". Vite is now at 5.2.13.

vite-jest appears unmaintained as of July 27 2023:

Additionally, the vite guide makes no reference to jest and is likely of no use to people attempting to port jest suites to vite, or otherwise use jest with vite.

Description

The section should be updated to inform vite users that they are probably out of luck, and either warn them of the limitations of the jest-vite library, or avoid mentioning it entirely.

Using Vite

Jest is not supported by vite due to how the plugin system from vite works.

There are examples for jest integration with vite in the vite-jest library, however as of 5/10/24 this library is not compatible with versions of vite later than 2.4.2.

@Jon-Biz Jon-Biz changed the title [Docs]: Documentation suggest vite-jest library for vite compatibility, but vite-jest is obsolete and appears unmaintained. [Docs]: Documentation suggests the vite-jest library for vite compatibility, but vite-jest is obsolete and appears unmaintained. Jun 11, 2024
@mrazauskas
Copy link
Contributor

Do you suggest to remove those lines on vite-jest from the docs?

@Jon-Biz
Copy link
Author

Jon-Biz commented Jun 11, 2024

Sorry, yes the form seemed to suggest that the second markdown field would be more clearly displayed. I was proposing changing it to the copy in the description section above. To wit:


Using Vite

Jest is not supported by vite due to how the plugin system from vite works.

There are examples for jest integration with vite in the vite-jest library, however as of 5/10/24 this library is not compatible with versions of vite later than 2.4.2.


@mrazauskas
Copy link
Contributor

Thanks! This looks good to me. I mean, the situation is odd, but your text explains it better. Would you like to open a PR with this change?

@Jon-Biz
Copy link
Author

Jon-Biz commented Jun 11, 2024

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants