Skip to content

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

Closed

Description

@Almenon

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 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 :(

Activity

  1. 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
  2. Almenon commented on Oct 14, 2019

    @Almenon
    Author

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

  3. added
    extensions-development
    feature-request
    on Oct 25, 2019
  4. added this to the November 2019 milestone on Oct 25, 2019
  5. octref commented on Dec 11, 2019

    @octref
    Contributor

    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.

  6. added
    *as-designed
    and removed
    feature-request
    on Dec 11, 2019
  7. locked and limited conversation to collaborators on Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

*as-designedextensions-development

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions