forked from irinazheltisheva/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocesses.test.ts
More file actions
33 lines (31 loc) · 1.06 KB
/
Copy pathprocesses.test.ts
File metadata and controls
33 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*---------------------------------------------------------------------------------------------
* 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'
};
processes.sanitizeProcessEnvironment(env);
assert.equal(env['FOO'], 'bar');
assert.equal(Object.keys(env).length, 1);
});
});