How to use the vscode-test.resolveCliPathFromVSCodeExecutablePath function in vscode-test

To help you get started, we’ve selected a few vscode-test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / vscode-java-test / test / index.ts View on Github external
async function main(): Promise {
    try {
        // The folder containing the Extension Manifest package.json
        // Passed to `--extensionDevelopmentPath`
        const extensionDevelopmentPath: string = path.resolve(__dirname, '../../');

        const vscodeExecutablePath: string = await downloadAndUnzipVSCode('stable');
        const cliPath: string = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath);

        cp.spawnSync(cliPath, ['--install-extension', 'redhat.java'], {
            encoding: 'utf-8',
            stdio: 'inherit',
        });

        cp.spawnSync(cliPath, ['--install-extension', 'vscjava.vscode-java-debug'], {
            encoding: 'utf-8',
            stdio: 'inherit',
        });

        // Run Maven JUnit 4 Code Lens tests
        await runTests({
            vscodeExecutablePath,
            extensionDevelopmentPath,
            extensionTestsPath: path.resolve(__dirname, './maven-junit4-suite'),
github IBM-Blockchain / blockchain-vscode-extension / packages / blockchain-extension / cucumber / runCucumberTests.ts View on Github external
if (process.env.VERSION) {
            version = process.env.VERSION;
        }
        // The folder containing the Extension Manifest package.json
        // Passed to `--extensionDevelopmentPath`
        const extensionDevelopmentPath: string = path.resolve(__dirname, '..', '..');

        // The path to the extension test runner script
        // Passed to --extensionTestsPath
        const extensionTestsPath: string = path.resolve(__dirname);

        const workspacePath: string = path.resolve(__dirname, '..', '..', 'cucumber', 'data', 'cucumber.code-workspace');

        const vscodeExecutablePath: string = await downloadAndUnzipVSCode(version);

        const cliPath: string = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath);

        // Use cp.spawn / cp.exec for custom setup
        cp.spawnSync(cliPath, ['--install-extension', 'oshri6688.javascript-test-runner'], {
            encoding: 'utf-8',
            stdio: 'inherit'
        });

        // Download VS Code, unzip it and run the integration test
        await runTests({
            extensionDevelopmentPath,
            extensionTestsPath,
            launchArgs: [workspacePath],
            version: version
        });
    } catch (err) {
        // tslint:disable-next-line: no-console
github valentjn / vscode-ltex / test / runTests.ts View on Github external
}

  ltexDirPath = Path.resolve(__dirname, '..', '..');
  let codeVersion: string = 'stable';
  let codePlatform: string | undefined;

  if (process.platform == 'win32') {
    codeVersion = '1.35.1';
    codePlatform = 'win32-x64-archive';
  }

  console.log('Downloading and installing VS Code...');
  vscodeExecutablePath = await CodeTest.downloadAndUnzipVSCode(codeVersion, codePlatform);

  console.log('Resolving CLI path to VS Code...');
  cliPath = CodeTest.resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath);

  for (let testIteration: number = 0; testIteration < 4; testIteration++) {
    if (fastMode && (testIteration != 1)) continue;
    await runTestIteration(testIteration);
  }

  return Promise.resolve();
}

vscode-test

![Test Status Badge](https://github.com/microsoft/vscode-test/workflows/Tests/badge.svg)

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Similar packages