mirror of
https://github.com/coder/code-server.git
synced 2026-05-28 07:59:34 +00:00
Merge commit 'be3e8236086165e5e45a5a10783823874b3f3ebd' as 'lib/vscode'
This commit is contained in:
35
lib/vscode/src/vs/base/test/common/processes.test.ts
Normal file
35
lib/vscode/src/vs/base/test/common/processes.test.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as processes from 'vs/base/common/processes';
|
||||
|
||||
suite('Processes', () => {
|
||||
test('sanitizeProcessEnvironment', () => {
|
||||
let env = {
|
||||
FOO: 'bar',
|
||||
ELECTRON_ENABLE_STACK_DUMPING: 'x',
|
||||
ELECTRON_ENABLE_LOGGING: 'x',
|
||||
ELECTRON_NO_ASAR: 'x',
|
||||
ELECTRON_NO_ATTACH_CONSOLE: 'x',
|
||||
ELECTRON_RUN_AS_NODE: 'x',
|
||||
GOOGLE_API_KEY: 'x',
|
||||
VSCODE_CLI: 'x',
|
||||
VSCODE_DEV: 'x',
|
||||
VSCODE_IPC_HOOK: 'x',
|
||||
VSCODE_LOGS: 'x',
|
||||
VSCODE_NLS_CONFIG: 'x',
|
||||
VSCODE_PORTABLE: 'x',
|
||||
VSCODE_PID: 'x',
|
||||
VSCODE_NODE_CACHED_DATA_DIR: 'x',
|
||||
VSCODE_NEW_VAR: 'x',
|
||||
GDK_PIXBUF_MODULE_FILE: 'x',
|
||||
GDK_PIXBUF_MODULEDIR: 'x',
|
||||
};
|
||||
processes.sanitizeProcessEnvironment(env);
|
||||
assert.equal(env['FOO'], 'bar');
|
||||
assert.equal(Object.keys(env).length, 1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user