mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
don't freeze vscode.env when running tests, #74121
This commit is contained in:
@@ -236,7 +236,7 @@ export function createApiFactory(
|
||||
};
|
||||
|
||||
// namespace: env
|
||||
const env: typeof vscode.env = Object.freeze<typeof vscode.env>({
|
||||
const env: typeof vscode.env = {
|
||||
get machineId() { return initData.telemetryInfo.machineId; },
|
||||
get sessionId() { return initData.telemetryInfo.sessionId; },
|
||||
get language() { return initData.environment.appLanguage; },
|
||||
@@ -257,7 +257,11 @@ export function createApiFactory(
|
||||
openExternal(uri: URI) {
|
||||
return extHostWindow.openUri(uri, { allowTunneling: !!initData.remoteAuthority });
|
||||
}
|
||||
});
|
||||
};
|
||||
if (!initData.environment.extensionTestsLocationURI) {
|
||||
// allow to patch env-function when running tests
|
||||
Object.freeze(env);
|
||||
}
|
||||
|
||||
// namespace: extensions
|
||||
const extensions: typeof vscode.extensions = {
|
||||
|
||||
Reference in New Issue
Block a user