Skip to content

Commit 3f4e6a4

Browse files
author
Benjamin Pasero
committed
test - make integration tests arguments
1 parent f224c59 commit 3f4e6a4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/integration/browser/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import * as tmp from 'tmp';
1111
import * as rimraf from 'rimraf';
1212

1313
const optimist = require('optimist')
14+
.describe('workspacePath', 'path to the workspace to open in the test').string()
15+
.describe('extensionDevelopmentPath', 'path to the extension to test').string()
16+
.describe('extensionTestsPath', 'path to the extension tests').string()
1417
.describe('debug', 'do not run browsers headless').boolean('debug')
1518
.describe('browser', 'browser in which integration tests should run').string('browser').default('browser', 'chromium')
1619
.describe('help', 'show the help').alias('help', 'h');
@@ -26,10 +29,9 @@ async function runTestsInBrowser(browserType: string, endpoint: string): Promise
2629
const host = url.parse(endpoint).host;
2730
const protocol = 'vscode-remote';
2831

29-
const integrationTestsPath = path.join(__dirname, '..', '..', '..', '..', 'extensions', 'vscode-api-tests');
30-
const testWorkspaceUri = url.format({ pathname: path.join(integrationTestsPath, 'testWorkspace'), protocol, host, slashes: true });
31-
const testExtensionUri = url.format({ pathname: path.join(integrationTestsPath), protocol, host, slashes: true });
32-
const testFilesUri = url.format({ pathname: path.join(integrationTestsPath, 'out', 'singlefolder-tests'), protocol, host, slashes: true });
32+
const testWorkspaceUri = url.format({ pathname: path.resolve(optimist.argv.workspacePath), protocol, host, slashes: true });
33+
const testExtensionUri = url.format({ pathname: path.resolve(optimist.argv.extensionDevelopmentPath), protocol, host, slashes: true });
34+
const testFilesUri = url.format({ pathname: path.resolve(optimist.argv.extensionTestsPath), protocol, host, slashes: true });
3335

3436
const folderParam = testWorkspaceUri;
3537
const payloadParam = `[["extensionDevelopmentPath","${testExtensionUri}"],["extensionTestsPath","${testFilesUri}"]]`;

0 commit comments

Comments
 (0)