Closed nukeop closed 4 months ago
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.
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?
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.
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
Output
Version
v0.10.7
Validations