Skip to content

Can run tests even when VS Code is running if --user-data-dir is specified or, the version is different. #58

Closed

Description

Version: 1.43.0
Commit: 78a4c91400152c0f27ba4d363eb56d2835f9903a
Date: 2020-03-09T19:34:44.548Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0

I have noticed that we can run tests from the command line even when VS Code is running if --user-data-dir is specified, or the version is different from the current one.

runTests({
    extensionDevelopmentPath,
    extensionTestsPath,
    launchArgs: [
        testWorkspace,
        '--user-data-dir=' + tmpdirName,
    ]
})

or

runTests({
    version: '1.42.1', // Old version
    extensionDevelopmentPath,
    extensionTestsPath,
    launchArgs: [
        testWorkspace,
    ]
})

If this is an intended behavior, I think it should be documented, which extension authors would want to know. If not, and it leads unexpected problems, it should be documented too.

Especially, --user-data-dir should be documented anyway in https://code.visualstudio.com/api/working-with-extensions/testing-extension since the integration tests should be executed with a default settings.json, not with extension authors' one.

The architecture is so great that we can easily develop integration tests of VS Code extensions. Thank you.

Activity

  1. connor4312 commented on Jan 11, 2022

    @connor4312
    Member

    By default we now run tests with a distinct user data dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions