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

vscode-test support? #168

Open
JustinGrote opened this issue Jun 29, 2023 · 2 comments
Open

vscode-test support? #168

JustinGrote opened this issue Jun 29, 2023 · 2 comments
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@JustinGrote
Copy link

JustinGrote commented Jun 29, 2023

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!

@JustinGrote JustinGrote added the p2-nice-to-have Not breaking anything but nice to have (priority) label Jun 29, 2023
@JustinGrote
Copy link
Author

JustinGrote commented Sep 1, 2023

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.

@sheremet-va
Copy link
Member

sheremet-va commented Mar 15, 2024

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: #270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

2 participants