vscode-test
Advanced tools
Comparing version 0.3.5 to 0.4.0
# Changelog | ||
### 0.4.0 | 2019-04-18 | ||
- Add `testRunnerEnv` option. [#13](https://github.com/Microsoft/vscode-test/issues/13). | ||
### 0.3.5 | 2019-04-17 | ||
@@ -4,0 +8,0 @@ |
@@ -34,2 +34,8 @@ export interface TestOptions { | ||
/** | ||
* Environment variables being passed to the test runner. | ||
*/ | ||
testRunnerEnv?: { | ||
[key: string]: string | undefined; | ||
}; | ||
/** | ||
* Absolute path of the fixture workspace to launch for testing | ||
@@ -86,3 +92,9 @@ */ | ||
launchArgs: string[]; | ||
/** | ||
* Environment variables being passed to the test runner. | ||
*/ | ||
testRunnerEnv?: { | ||
[key: string]: string | undefined; | ||
}; | ||
} | ||
export declare function runTests(options: TestOptions | ExplicitTestOptions): Promise<number>; |
@@ -58,3 +58,3 @@ "use strict"; | ||
if ('launchArgs' in options) { | ||
return [2 /*return*/, innerRunTests(options.vscodeExecutablePath, options.launchArgs)]; | ||
return [2 /*return*/, innerRunTests(options.vscodeExecutablePath, options.launchArgs, options.testRunnerEnv)]; | ||
} | ||
@@ -70,3 +70,3 @@ args = [ | ||
} | ||
return [2 /*return*/, innerRunTests(options.vscodeExecutablePath, args)]; | ||
return [2 /*return*/, innerRunTests(options.vscodeExecutablePath, args, options.testRunnerEnv)]; | ||
} | ||
@@ -77,7 +77,7 @@ }); | ||
exports.runTests = runTests; | ||
function innerRunTests(executable, args) { | ||
function innerRunTests(executable, args, testRunnerEnv) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, new Promise(function (resolve, reject) { | ||
var cmd = cp.spawn(executable, args); | ||
var cmd = cp.spawn(executable, args, { env: testRunnerEnv }); | ||
cmd.stdout.on('data', function (data) { | ||
@@ -84,0 +84,0 @@ var s = data.toString(); |
{ | ||
"name": "vscode-test", | ||
"version": "0.3.5", | ||
"version": "0.4.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "compile": "tsc -p ./", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38456
598