![]() ![]() VS Code provides two CLI parameters for running extension tests, -extensionDevelopmentPath and -extensionTestsPath.įor example: # - Launches VS Code Extension Host # - Loads the extension at # - Executes the test runner script at code \ -extensionDevelopmentPath= \ -extensionTestsPath= The test runner script ( src/test/suite/index.ts).The rest of this document explains these files in the context of the sample: Runs the Mocha tests specified by the extension test runner script.Īlternatively, you can find the configuration for this guide in the helloworld-test-sample.Downloads and unzips latest version of VS Code.In the generated extension, you can use npm run test or yarn test to run the integration tests that: If you are using the Yeoman Generator to scaffold an extension, integration tests are already created for you. If you are migrating from vscode, see migrating from vscode. This documentation focuses on VS Code integration tests. We refer to these tests as integration tests, because they go beyond unit tests that can run without a VS Code instance. These tests will run inside a special instance of VS Code named the Extension Development Host, and have full access to the VS Code API. Visual Studio Code supports running and debugging tests for your extension.
0 Comments
Leave a Reply. |