Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2869f7

Browse files
committed
fixed test to resolve settings before comparing
1 parent 7517a18 commit e2869f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/extension.common.configSettings.test.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import * as assert from 'assert';
1212
// as well as import your extension to test it
1313
import * as vscode from 'vscode';
1414
import { PythonSettings } from '../client/common/configSettings';
15+
import { SystemVariables } from '../client/common/systemVariables';
1516

1617
const pythonSettings = PythonSettings.getInstance();
1718

@@ -22,12 +23,16 @@ suite('Configuration Settings', () => {
2223
});
2324
if (!IS_TRAVIS) {
2425
test('Check Values', done => {
26+
const systemVariables: SystemVariables = new SystemVariables();
2527
const pythonConfig = vscode.workspace.getConfiguration('python');
2628
Object.keys(pythonSettings).forEach(key => {
27-
const settingValue = pythonConfig.get(key, 'Not a config');
29+
let settingValue = pythonConfig.get(key, 'Not a config');
2830
if (settingValue === 'Not a config') {
2931
return;
3032
}
33+
if (typeof settingValue === 'object' && settingValue !== null) {
34+
settingValue = systemVariables.resolve(settingValue);
35+
}
3136
assert.deepEqual(settingValue, pythonSettings[key], `Setting ${key} not the same`);
3237
});
3338

0 commit comments

Comments
 (0)