Welcome to mirror list, hosted at ThFree Co, Russian Federation.

driver.js « src « automation « test - github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c415029cdf9d88a9fe2ac4b68593f14be6e05540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

//@ts-check
'use strict';

const path = require('path');

exports.connect = function (outPath, handle) {
	const bootstrapPath = path.join(outPath, 'bootstrap-amd.js');
	const { load } = require(bootstrapPath);

	return new Promise((resolve, reject) => load('vs/platform/driver/node/driver', ({ connect }) => connect(handle).then(resolve, reject), reject));
};