vscode-test#runTests TypeScript Examples
The following examples show how to use
vscode-test#runTests.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: runIntergration.ts From myst-vs-code with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../../")
// The path to the extension test runner script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./integration/index")
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath, version: "1.58.0" })
} catch (err) {
console.error(err)
console.error("Failed to run tests")
process.exit(1)
}
}
Example #2
Source File: runTest.ts From material-ui-snippets with MIT License | 6 votes |
async function main(): Promise<void> {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../')
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index')
// Download VS Code, unzip it and run the integration test
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
})
} catch (err) {
console.error('Failed to run tests') // eslint-disable-line no-console
process.exit(1)
}
}
Example #3
Source File: runTest.ts From vscode-todo-md with MIT License | 6 votes |
async function main(): Promise<void> {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #4
Source File: runTest.ts From Helm-Intellisense with MIT License | 6 votes |
async function main(): Promise<void> {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/Test');
// Download VS Code, unzip it and run the integration test
await runTests({extensionDevelopmentPath, extensionTestsPath, launchArgs: ['--disable-extensions']});
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #5
Source File: runTest.ts From memo with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './testRunner');
// Temp workspace dir re-created automatically see precompile:tests script in package.json
const tmpWorkspaceDir = path.join(extensionDevelopmentPath, 'tmp', 'test-workspace');
// Download VS Code, unzip it and run the integration test
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: [tmpWorkspaceDir, '--disable-extensions', '--disable-workspace-trust'],
});
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #6
Source File: runTest.ts From vscode-stripe with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// The path to the extension test workspace
const testWorkspace = path.resolve(__dirname, extensionDevelopmentPath + '/test/workspace/');
const launchArgs = [
testWorkspace,
// This disables all extensions except the one being testing
'--disable-extensions',
];
const extensionTestsEnv = {
EXTENSION_MODE: 'development',
};
// Download VS Code, unzip it and run the integration test
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs,
extensionTestsEnv,
});
} catch (err) {
console.log(err);
console.error('Failed to run tests (src/test/runTest.ts)');
// eslint-disable-next-line no-process-exit
process.exit(1);
}
}
Example #7
Source File: runTest.ts From vscode-sqlfluff with MIT License | 6 votes |
main = async () => {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #8
Source File: runTest.ts From vscode-fzf-quick-open with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #9
Source File: runTest.ts From vscode-microprofile with Apache License 2.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #10
Source File: runTest.ts From reach-ide with Eclipse Public License 2.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #11
Source File: runTest.ts From typescript-explicit-types with GNU General Public License v3.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #12
Source File: runTest.ts From vscode-file-downloader with MIT License | 6 votes |
main = async () => {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, `../../`);
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, `./suite/index`);
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
}
catch (error) {
process.exit(1);
}
}
Example #13
Source File: runTest.ts From vscode-go-template with MIT License | 6 votes |
main = async () => {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, `..${path.sep}..${path.sep}`);
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, `.${path.sep}suite${path.sep}index`);
const launchArgs = ['--disable-extensions'];
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #14
Source File: runTest.ts From intersystems-servermanager with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../");
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./suite/index");
const launchArgs = [];
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs });
} catch (err) {
console.error("Failed to run tests", err);
process.exit(1);
}
}
Example #15
Source File: runTest.ts From macro-executor with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #16
Source File: runTest.ts From vscode-recall with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
const testWorkspace = path.resolve(__dirname, '../../demo');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [ testWorkspace ] });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #17
Source File: runTest.ts From openwhisk-vscode-extension with Apache License 2.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// The path to the workspace file
const workspace = path.resolve('test-fixtures');
// Download VS Code, unzip it and run the integration test
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
/**
* The `--disable-extensions` option is for disabling other extensions while debugging.
* https://code.visualstudio.com/api/working-with-extensions/testing-extension#disabling-other-extensions-while-debugging
*/
launchArgs: [workspace, '--disable-extensions'],
extensionTestsEnv: { VSCODE_TEST_MODE: 'true' },
});
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #18
Source File: runTest.ts From vscode-alxmldocumentation with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #19
Source File: runTest.ts From google-drive-vscode with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #20
Source File: runTest.ts From element-ui-helper with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../')
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index')
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath })
} catch (err) {
console.error('Failed to run tests')
process.exit(1)
}
}
Example #21
Source File: runTest.ts From CodePal with GNU General Public License v3.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #22
Source File: runTest.ts From lego-spikeprime-mindstorms-vscode with Apache License 2.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../");
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./suite/index");
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
}
catch (err) {
console.error("Failed to run tests");
process.exit(1);
}
}
Example #23
Source File: runTest.ts From dockerfiletemplate with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../");
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./suite/index");
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error("Failed to run tests");
process.exit(1);
}
}
Example #24
Source File: runTest.ts From sourcepawn-vscode with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../");
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./suite/index");
// The path to the workspace file
const workspace = extensionDevelopmentPath + "/src/test/testSuite";
// Download VS Code, unzip it and run the integration test
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: [workspace, "--disable-extensions"],
});
} catch (err) {
console.error("Failed to run tests");
process.exit(1);
}
}
Example #25
Source File: runTest.ts From vscode-windows-terminal with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #26
Source File: multiRootTest.ts From vscode-alxmldocumentation with MIT License | 6 votes |
function start() {
console.log('*'.repeat(100));
console.log('Start Multiroot tests');
runTests({
extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS,
extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'),
launchArgs: [workspacePath],
extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' },
}).catch((ex) => {
console.error('End Multiroot tests (with errors)', ex);
process.exit(1);
});
}
Example #27
Source File: runTest.ts From flatpak-vscode with MIT License | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../')
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index')
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath })
} catch (err) {
process.exit(1)
}
}
Example #28
Source File: index.ts From vscode-clangd with MIT License | 6 votes |
// The main entry point: its job is to launch VSCode and execute run() under it.
async function main() {
try {
// The extension to be loaded is in the parent directory.
const extensionDevelopmentPath = path.resolve(__dirname, '../');
// The run() function to run in vscode is defined in this file.
const extensionTestsPath = __filename;
// Download VS Code, unzip it and run the integration test
await runTests({extensionDevelopmentPath, extensionTestsPath});
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
Example #29
Source File: runTest.ts From dendron with GNU Affero General Public License v3.0 | 6 votes |
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../../");
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./index");
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error("Failed to run tests");
process.exit(1);
}
}