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
Support retiring test states #9
base: main
Are you sure you want to change the base?
Conversation
Fixes #8 |
I forgot to mention: this assumes that |
I managed to test it now, but VSCode doesn't seem to react to |
I have update this PR to the latest API. |
Thanks for the PR. I actually want to remove, or at least rethink, invalidation in the new APIs. The Test Explorer uses it as a UI hint and (or primarily?) to support autorun. However, in the native APIs I would rather delegate autorun to extensions themselves since most underlying runners already have a notion of autorun built-in (like I want to tackle this next month and would be interested to hear your thoughts 🙂 |
The only reason why autorun is handled by the Test Explorer extension is that it's possible to enable autorun only for some tests - the adapter doesn't have that information, so it sends an invalidation event to the Test Explorer and lets it decide which of the invalidated tests should be run. Without this feature (i.e. if autorun can only be enabled for all tests or none) it probably makes more sense to let the adapter handle it. |
Apparently tests are now only retired/invalidated when I restart VS Code. Is that correct? Are there any plans to support retiring tests programmatically or in response to some events other than restarting VS Code? |
Unfortunately some other high priority work has come up that has delayed work on microsoft/vscode#134941 and, by proxy, this. Currently I don't plan to support additional notion of programmatic retirement, however that may change after initial implementation of autorun based on feedback I get from extension authors. |
I couldn't test this code (yet) because the latest insiders build doesn't implement the latest version of the testing API yet (and I don't know how to get an older
vscode.proposed.d.ts
).