vscode-test support?
https://github.com/microsoft/vscode-test is a way to do vscode E2E testing for vscode extensions using a real vscode instance instead of mocking the vscode interface.
I had a way to make this work with Mocha by injecting the test worker into the vscode test instance so the explorer can still get the results. https://github.com/pester/vscode-adapter/blob/4b18781f8db580e1c66b7895950c1d9bb83e0de8/test/runTestsInner.ts
Just wondering if something similar is possible for the vitest explorer. Thanks!
As a follow-up, this is currently not possible because vitest is ESM only, and vscode only supports CommonJS modules today. This has been fixed in electron as of today but it will probably be a long time before vscode merges this version of electron.
Right now we use our own wrapper for e2e tests: https://github.com/vitest-dev/vscode/tree/main/test-e2e
After using it for some time, I am not satisfied with it, to be honest. I wish we had better locators for text/buttons.
There is also an open PR with a discussion for a similar e2e tool: https://github.com/vitest-dev/vscode/pull/270