vscode-test
- Version 1.6.1
- Published
- 41.9 kB
- 4 dependencies
- MIT license
Install
npm i vscode-test
yarn add vscode-test
pnpm add vscode-test
Overview
![Test Status Badge](https://github.com/microsoft/vscode-test/workflows/Tests/badge.svg)
Index
Functions
function download
download: (options?: Partial<DownloadOptions>) => Promise<string>;
Download and unzip a copy of VS Code.
Returns
Promise of
vscodeExecutablePath
.
function downloadAndUnzipVSCode
downloadAndUnzipVSCode: ( version?: DownloadVersion, platform?: DownloadPlatform) => Promise<string>;
Download and unzip a copy of VS Code in
.vscode-test
. The paths are: -.vscode-test/vscode-<PLATFORM>-<VERSION>
. For example,./vscode-test/vscode-win32-1.32.0
-.vscode-test/vscode-win32-insiders
.*If a local copy exists at
.vscode-test/vscode-<PLATFORM>-<VERSION>
, skip download.*Parameter version
The version of VS Code to download such as
1.32.0
. You can also use'stable'
for downloading latest stable release.'insiders'
for downloading latest Insiders. When unspecified, download latest stable version.Returns
Promise of
vscodeExecutablePath
.
function resolveCliPathFromVSCodeExecutablePath
resolveCliPathFromVSCodeExecutablePath: (vscodeExecutablePath: string) => string;
Resolve the VS Code cli path from executable path returned from
downloadAndUnzipVSCode
. You can use this path to spawn processes for extension management. For example:const cp = require('child_process');const { downloadAndUnzipVSCode, resolveCliPathFromExecutablePath } = require('vscode-test')const vscodeExecutablePath = await downloadAndUnzipVSCode('1.36.0');const cliPath = resolveCliPathFromExecutablePath(vscodeExecutablePath);cp.spawnSync(cliPath, ['--install-extension', '<EXTENSION-ID-OR-PATH-TO-VSIX>'], {encoding: 'utf-8',stdio: 'inherit'});Parameter vscodeExecutablePath
The
vscodeExecutablePath
fromdownloadAndUnzipVSCode
.
function runTests
runTests: (options: TestOptions) => Promise<number>;
Run VS Code extension test
Returns
The exit code of the command to launch VS Code extension test
Package Files (4)
Dependencies (4)
Dev Dependencies (8)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/vscode-test
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/vscode-test)
- HTML<a href="https://www.jsdocs.io/package/vscode-test"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1532 ms. - Missing or incorrect documentation? Open an issue for this package.