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

Ability to more effectively run unit tests for extension development #82471

Closed
Almenon opened this issue Oct 14, 2019 · 2 comments
Closed

Ability to more effectively run unit tests for extension development #82471

Almenon opened this issue Oct 14, 2019 · 2 comments
Assignees
Labels
*as-designed Described behavior is as designed extensions-development Issues for developing extensions
Milestone

Comments

@Almenon
Copy link

Almenon commented Oct 14, 2019

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:

None of these workarounds are ideal. As @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 :(

@Almenon Almenon changed the title Ability to run unit tests using code that references vscode API Ability to more effectively run unit tests for extension development Oct 14, 2019
@Almenon
Copy link
Author

Almenon commented Oct 14, 2019

To clarify this is a feature request. Thought it would get labeled automatically 🤔

@octref octref added extensions-development Issues for developing extensions feature-request Request for new features or functionality labels Oct 25, 2019
@octref octref added this to the November 2019 milestone Oct 25, 2019
@octref
Copy link
Contributor

octref commented 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.

@octref octref closed this as completed Dec 11, 2019
@octref octref added *as-designed Described behavior is as designed and removed feature-request Request for new features or functionality labels Dec 11, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed extensions-development Issues for developing extensions
Projects
None yet
Development

No branches or pull requests

2 participants