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

Vitest v1.2.0 is not supported. Vitest v1.4.0 or newer is required. #405

Closed
4 tasks done
nukeop opened this issue Jun 2, 2024 · 3 comments
Closed
4 tasks done

Vitest v1.2.0 is not supported. Vitest v1.4.0 or newer is required. #405

nukeop opened this issue Jun 2, 2024 · 3 comments

Comments

@nukeop
Copy link

nukeop commented Jun 2, 2024

Describe the bug

I'm getting this message when I'm loading any repo with certain vitest versions, e.g. ^1.2.0, it doesn't show the buttons to run individual tests. Tests ran from CLI work fine. There is nothing preventing the extension from working with earlier versions in principle, as there are no breaking changes. Breaking compatibility without a very good reason is troublesome.

Changing the "1.4.0" in the extension code to a lower number such as "1.0.0" reveals this is an arbitrary requirement; the extension works fine with lower versions of vitest. It causes unnecessary problems for people who don't want or can't upgrade vitest.

Reproduction

  1. Install vitest with any version lower than 1.4.0, at least v1.2.0 reproduces this.
  2. Load it in vs code with this extension.

Output

[INFO 21:55:40] [v0.10.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.

Version

v0.10.7

Validations

@sheremet-va
Copy link
Member

Vitest 1.4.0 added a lot of useful APIs for the extension to work properly, like locations to point to the correct line in the test. We did a poll on Twitter to see the percentage of people who are using the extension with what version, and the results showed us that we can require the higher version.

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2024
@nukeop
Copy link
Author

nukeop commented Jun 2, 2024

I don't use Twitter and can't participate in twitter polls, as I imagine many people do. My test where I simply replaced the required version in the extension code and did nothing else made it work. As far as I can see it runs my tests and there are no errors. So why not let us run the tests anyway?

@sheremet-va
Copy link
Member

Because showing test icons in test files is one of the main features and we can't just not have it for certain people - instead of answering to you in this PR, I would have to answer to more people in even more PRs if we allowed that.

For the twitter poll, we looked at the percentage of people who use the latest version, so the number of counts didn't matter.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants