forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec.unit.test.ts
More file actions
25 lines (20 loc) · 840 Bytes
/
exec.unit.test.ts
File metadata and controls
25 lines (20 loc) · 840 Bytes
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { expect } from 'chai';
import { OSType } from '../../common';
import { getSearchPathEnvVarNames } from '../../../client/common/utils/exec';
suite('Utils for exec - getSearchPathEnvVarNames function', () => {
const testsData = [
{ os: 'Unknown', expected: ['PATH'] },
{ os: 'Windows', expected: ['Path', 'PATH'] },
{ os: 'OSX', expected: ['PATH'] },
{ os: 'Linux', expected: ['PATH'] },
];
testsData.forEach((testData) => {
test(`getSearchPathEnvVarNames when os is ${testData.os}`, () => {
const pathVariables = getSearchPathEnvVarNames(testData.os as OSType);
expect(pathVariables).to.deep.equal(testData.expected);
});
});
});