You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to more effectively run unit tests for extension development #82471
The vscode-test package allows you to run integration tests where you launch the tests through vscode and a instance of vscode opens up. But if I want to do normal unit tests against code that has even a single reference to vscode I am not able to do so due to #6586. There are several workarounds:
stick with integration tests (slow, not usable with test explorer UI, and not really usable with command line either†)
None of these workarounds are ideal. As George Cook (@georgejecook) pointed out "it seems most people (judging by github repos) simply don’t do a lot of testing". Making it easier to write unit tests would encourage extension authors to do more testing, thereby decreasing bugs and making users and authors happier.
† tests ran from command line can't be run while vscode is opened :(
changed the title [-]Ability to run unit tests using code that references vscode API[/-][+]Ability to more effectively run unit tests for extension development[/+]on Oct 14, 2019
I think you should have some layering logic so that unit tests can run without access to vscode module. For example: microsoft/vscode-wordcount#5 (comment)
I don't see anything concrete we can do to make this simpler.
Activity
[-]Ability to run unit tests using code that references vscode API[/-][+]Ability to more effectively run unit tests for extension development[/+]Almenon commentedon Oct 14, 2019
To clarify this is a feature request. Thought it would get labeled automatically 🤔
octref commentedon Dec 11, 2019
I think you should have some layering logic so that unit tests can run without access to vscode module. For example: microsoft/vscode-wordcount#5 (comment)
I don't see anything concrete we can do to make this simpler.