microsoft / microsoft/vscode-extension-test-runner
Issues with Test Discovery
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 15
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 2
Description
I am trying to understand how to perform extension testing using the steps here
I've created an extension example using: "yo code"
I chose esbuild as the bundler and npm as the package manager when prompted.
This results in an extension that includes a test file called extension.test.ts
I've noticed the following:
-
After opening the workspace, I can execute: "npm run test" from the terminal pane to run the tests
The test runs, but after it completes the Test Pane is empty and there are no gutter decorations in the extension.test.ts file. If I restart VS Code, the Test Pane shows the tests. Also if I execute "npm run test" from the terminal before starting VS Code the first time, the Test Pane is populated. is this expected? -
As I edit the test file, the Test Pane does not update to reflect new tests, or name changes of existing tests. I've found that if I execute: "tsc -p . -w --outDir out" in the terminal, the Test Pane updates for the rest of that session. Is there a way to start the "watch-tests" script each time the workspace is opened?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated extension.test.ts and the npm scripts used by the example, then run npm run test and observe the Test Pane before and after restarting VS Code. Compare this with running tsc -p . -w --outDir out and inspect the watch-tests script. Done should clarify and, if appropriate, support initial discovery and updates after test edits without manual watch setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100