From 3f4e6a4854c2a533ca5593343b4d4145bebe3d04 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 7 Feb 2020 16:35:28 +0100 Subject: [PATCH] test - make integration tests arguments --- test/integration/browser/src/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/integration/browser/src/index.ts b/test/integration/browser/src/index.ts index 559bbafc162..004c9242cc7 100644 --- a/test/integration/browser/src/index.ts +++ b/test/integration/browser/src/index.ts @@ -11,6 +11,9 @@ import * as tmp from 'tmp'; import * as rimraf from 'rimraf'; const optimist = require('optimist') + .describe('workspacePath', 'path to the workspace to open in the test').string() + .describe('extensionDevelopmentPath', 'path to the extension to test').string() + .describe('extensionTestsPath', 'path to the extension tests').string() .describe('debug', 'do not run browsers headless').boolean('debug') .describe('browser', 'browser in which integration tests should run').string('browser').default('browser', 'chromium') .describe('help', 'show the help').alias('help', 'h'); @@ -26,10 +29,9 @@ async function runTestsInBrowser(browserType: string, endpoint: string): Promise const host = url.parse(endpoint).host; const protocol = 'vscode-remote'; - const integrationTestsPath = path.join(__dirname, '..', '..', '..', '..', 'extensions', 'vscode-api-tests'); - const testWorkspaceUri = url.format({ pathname: path.join(integrationTestsPath, 'testWorkspace'), protocol, host, slashes: true }); - const testExtensionUri = url.format({ pathname: path.join(integrationTestsPath), protocol, host, slashes: true }); - const testFilesUri = url.format({ pathname: path.join(integrationTestsPath, 'out', 'singlefolder-tests'), protocol, host, slashes: true }); + const testWorkspaceUri = url.format({ pathname: path.resolve(optimist.argv.workspacePath), protocol, host, slashes: true }); + const testExtensionUri = url.format({ pathname: path.resolve(optimist.argv.extensionDevelopmentPath), protocol, host, slashes: true }); + const testFilesUri = url.format({ pathname: path.resolve(optimist.argv.extensionTestsPath), protocol, host, slashes: true }); const folderParam = testWorkspaceUri; const payloadParam = `[["extensionDevelopmentPath","${testExtensionUri}"],["extensionTestsPath","${testFilesUri}"]]`;