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

Test: extension test runner #196332

Closed
2 tasks done
Tracked by #200459
connor4312 opened this issue Oct 23, 2023 · 0 comments
Closed
2 tasks done
Tracked by #200459

Test: extension test runner #196332

connor4312 opened this issue Oct 23, 2023 · 0 comments

Comments

@connor4312
Copy link
Member

connor4312 commented Oct 23, 2023

Refs: #189680

Complexity: 5

Create Issue


This iteration we worked on a test runner for VS Code extensions. Here is the documentation for it:
https://github.com/microsoft/vscode-docs/blob/vnext/api/working-with-extensions/testing-extension.md#quick-setup-the-test-cli. Please note the samples have not yet been updated; you can add it manually using the documented steps to an existing extension.

Please try out the CLI as well as the extension that provides integration into the VS Code UI. If you own an extension, you can adopt it there, or just work from the helloworld-test-sample.

  1. Add some tests, or have some test in an extension
  2. Add a .vscode-test.js file to the workspace as the documentation suggestions (you can also use .cjs or .mjs)
  3. Try the different options available in defineConfiguration, see that they work
  4. Try out the different CLI options (npx @vscode/test-cli --help should work)
  5. Install the extension and make sure it works like you would expect
    • Note that it operates only on compiled files, so test decorations are not updated until the project is compiled
    • It should rerun discovery in response to changes in the vscode-test config file
    • It should show any discovery errors that happen appropriately
    • Running and debugging should work
    • See its readme for details
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

3 participants