mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -5,11 +5,10 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { ConfigurationModel, CustomConfigurationModel, DefaultConfigurationModel, ConfigurationChangeEvent, AllKeysConfigurationChangeEvent } from 'vs/platform/configuration/common/configurationModels';
|
||||
import { ConfigurationModel, DefaultConfigurationModel, ConfigurationChangeEvent, ConfigurationModelParser } from 'vs/platform/configuration/common/configurationModels';
|
||||
import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
suite('ConfigurationModel', () => {
|
||||
|
||||
@@ -103,44 +102,6 @@ suite('ConfigurationModel', () => {
|
||||
assert.deepEqual(testObject.keys, []);
|
||||
});
|
||||
|
||||
test('setValueInOverrides adds to overrides if does not exist', () => {
|
||||
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a']);
|
||||
|
||||
testObject.setValueInOverrides('or', 'a', 2);
|
||||
|
||||
assert.deepEqual(testObject.overrides[0].contents, { 'a': 2 });
|
||||
assert.deepEqual(testObject.override('or').contents, { 'a': 2, 'b': 1 });
|
||||
});
|
||||
|
||||
test('setValueInOverrides adds to overrides if exist', () => {
|
||||
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or'], contents: { 'a': 2 } }]);
|
||||
|
||||
testObject.setValueInOverrides('or', 'a', 3);
|
||||
|
||||
assert.deepEqual(testObject.overrides[0].contents, { 'a': 3 });
|
||||
assert.deepEqual(testObject.override('or').contents, { 'a': 3, 'b': 1 });
|
||||
});
|
||||
|
||||
test('setValueInOverrides adds a nested key to overrides if exist', () => {
|
||||
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or'], contents: { 'a': { 'c': 1 } } }]);
|
||||
|
||||
testObject.setValueInOverrides('or', 'a.c', 2);
|
||||
|
||||
assert.deepEqual(testObject.overrides[0].contents, { 'a': { 'c': 2 } });
|
||||
assert.deepEqual(testObject.override('or').contents, { 'a': { 'c': 2 }, 'b': 1 });
|
||||
});
|
||||
|
||||
test('setValueInOverrides adds new overrides if exist', () => {
|
||||
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or1'], contents: { 'a': 2 } }]);
|
||||
|
||||
testObject.setValueInOverrides('or2', 'b', 2);
|
||||
|
||||
assert.deepEqual(testObject.overrides[0].contents, { 'a': 2 });
|
||||
assert.deepEqual(testObject.overrides[1].contents, { 'b': 2 });
|
||||
assert.deepEqual(testObject.override('or1').contents, { 'a': 2, 'b': 1 });
|
||||
assert.deepEqual(testObject.override('or2').contents, { 'a': 1, 'b': 2 });
|
||||
});
|
||||
|
||||
test('get overriding configuration model for an existing identifier', () => {
|
||||
let testObject = new ConfigurationModel(
|
||||
{ 'a': { 'b': 1 }, 'f': 1 }, [],
|
||||
@@ -212,7 +173,7 @@ suite('ConfigurationModel', () => {
|
||||
let result = base.merge(add);
|
||||
|
||||
assert.deepEqual(result.contents, { 'a': { 'b': 2 } });
|
||||
assert.deepEqual(result.getSectionContents('a'), { 'b': 2 });
|
||||
assert.deepEqual(result.getValue('a'), { 'b': 2 });
|
||||
assert.deepEqual(result.keys, ['a.b']);
|
||||
});
|
||||
|
||||
@@ -240,16 +201,16 @@ suite('ConfigurationModel', () => {
|
||||
|
||||
test('Test contents while getting an existing property', () => {
|
||||
let testObject = new ConfigurationModel({ 'a': 1 });
|
||||
assert.deepEqual(testObject.getSectionContents('a'), 1);
|
||||
assert.deepEqual(testObject.getValue('a'), 1);
|
||||
|
||||
testObject = new ConfigurationModel({ 'a': { 'b': 1 } });
|
||||
assert.deepEqual(testObject.getSectionContents('a'), { 'b': 1 });
|
||||
assert.deepEqual(testObject.getValue('a'), { 'b': 1 });
|
||||
});
|
||||
|
||||
test('Test contents are undefined for non existing properties', () => {
|
||||
const testObject = new ConfigurationModel({ awesome: true });
|
||||
|
||||
assert.deepEqual(testObject.getSectionContents('unknownproperty'), undefined);
|
||||
assert.deepEqual(testObject.getValue('unknownproperty'), undefined);
|
||||
});
|
||||
|
||||
test('Test override gives all content merged with overrides', () => {
|
||||
@@ -279,86 +240,97 @@ suite('CustomConfigurationModel', () => {
|
||||
});
|
||||
|
||||
test('simple merge using models', () => {
|
||||
let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
let add = new CustomConfigurationModel(JSON.stringify({ 'a': 3, 'c': 4 }));
|
||||
let result = base.merge(add);
|
||||
let base = new ConfigurationModelParser('base');
|
||||
base.parse(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
|
||||
let add = new ConfigurationModelParser('add');
|
||||
add.parse(JSON.stringify({ 'a': 3, 'c': 4 }));
|
||||
|
||||
let result = base.configurationModel.merge(add.configurationModel);
|
||||
assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 });
|
||||
});
|
||||
|
||||
test('simple merge with an undefined contents', () => {
|
||||
let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
let add = new CustomConfigurationModel(null);
|
||||
let result = base.merge(add);
|
||||
let base = new ConfigurationModelParser('base');
|
||||
base.parse(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
let add = new ConfigurationModelParser('add');
|
||||
let result = base.configurationModel.merge(add.configurationModel);
|
||||
assert.deepEqual(result.contents, { 'a': 1, 'b': 2 });
|
||||
|
||||
base = new CustomConfigurationModel(null);
|
||||
add = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
result = base.merge(add);
|
||||
base = new ConfigurationModelParser('base');
|
||||
add = new ConfigurationModelParser('add');
|
||||
add.parse(JSON.stringify({ 'a': 1, 'b': 2 }));
|
||||
result = base.configurationModel.merge(add.configurationModel);
|
||||
assert.deepEqual(result.contents, { 'a': 1, 'b': 2 });
|
||||
|
||||
base = new CustomConfigurationModel(null);
|
||||
add = new CustomConfigurationModel(null);
|
||||
result = base.merge(add);
|
||||
base = new ConfigurationModelParser('base');
|
||||
add = new ConfigurationModelParser('add');
|
||||
result = base.configurationModel.merge(add.configurationModel);
|
||||
assert.deepEqual(result.contents, {});
|
||||
});
|
||||
|
||||
test('Recursive merge using config models', () => {
|
||||
let base = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } }));
|
||||
let add = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 2 } }));
|
||||
let result = base.merge(add);
|
||||
let base = new ConfigurationModelParser('base');
|
||||
base.parse(JSON.stringify({ 'a': { 'b': 1 } }));
|
||||
let add = new ConfigurationModelParser('add');
|
||||
add.parse(JSON.stringify({ 'a': { 'b': 2 } }));
|
||||
let result = base.configurationModel.merge(add.configurationModel);
|
||||
assert.deepEqual(result.contents, { 'a': { 'b': 2 } });
|
||||
});
|
||||
|
||||
test('Test contents while getting an existing property', () => {
|
||||
let testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1 }));
|
||||
assert.deepEqual(testObject.getSectionContents('a'), 1);
|
||||
let testObject = new ConfigurationModelParser('test');
|
||||
testObject.parse(JSON.stringify({ 'a': 1 }));
|
||||
assert.deepEqual(testObject.configurationModel.getValue('a'), 1);
|
||||
|
||||
testObject = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } }));
|
||||
assert.deepEqual(testObject.getSectionContents('a'), { 'b': 1 });
|
||||
testObject.parse(JSON.stringify({ 'a': { 'b': 1 } }));
|
||||
assert.deepEqual(testObject.configurationModel.getValue('a'), { 'b': 1 });
|
||||
});
|
||||
|
||||
test('Test contents are undefined for non existing properties', () => {
|
||||
const testObject = new CustomConfigurationModel(JSON.stringify({
|
||||
const testObject = new ConfigurationModelParser('test');
|
||||
testObject.parse(JSON.stringify({
|
||||
awesome: true
|
||||
}));
|
||||
|
||||
assert.deepEqual(testObject.getSectionContents('unknownproperty'), undefined);
|
||||
assert.deepEqual(testObject.configurationModel.getValue('unknownproperty'), undefined);
|
||||
});
|
||||
|
||||
test('Test contents are undefined for undefined config', () => {
|
||||
const testObject = new CustomConfigurationModel(null);
|
||||
const testObject = new ConfigurationModelParser('test');
|
||||
|
||||
assert.deepEqual(testObject.getSectionContents('unknownproperty'), undefined);
|
||||
assert.deepEqual(testObject.configurationModel.getValue('unknownproperty'), undefined);
|
||||
});
|
||||
|
||||
test('Test configWithOverrides gives all content merged with overrides', () => {
|
||||
const testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } }));
|
||||
const testObject = new ConfigurationModelParser('test');
|
||||
testObject.parse(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } }));
|
||||
|
||||
assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } });
|
||||
assert.deepEqual(testObject.configurationModel.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } });
|
||||
});
|
||||
|
||||
test('Test configWithOverrides gives empty contents', () => {
|
||||
const testObject = new CustomConfigurationModel(null);
|
||||
const testObject = new ConfigurationModelParser('test');
|
||||
|
||||
assert.deepEqual(testObject.override('b').contents, {});
|
||||
assert.deepEqual(testObject.configurationModel.override('b').contents, {});
|
||||
});
|
||||
|
||||
test('Test update with empty data', () => {
|
||||
const testObject = new CustomConfigurationModel();
|
||||
testObject.update('');
|
||||
const testObject = new ConfigurationModelParser('test');
|
||||
testObject.parse('');
|
||||
|
||||
assert.deepEqual(testObject.contents, {});
|
||||
assert.deepEqual(testObject.keys, []);
|
||||
assert.deepEqual(testObject.configurationModel.contents, {});
|
||||
assert.deepEqual(testObject.configurationModel.keys, []);
|
||||
|
||||
testObject.update(null);
|
||||
testObject.parse(null);
|
||||
|
||||
assert.deepEqual(testObject.contents, {});
|
||||
assert.deepEqual(testObject.keys, []);
|
||||
assert.deepEqual(testObject.configurationModel.contents, {});
|
||||
assert.deepEqual(testObject.configurationModel.keys, []);
|
||||
|
||||
testObject.update(undefined);
|
||||
testObject.parse(undefined);
|
||||
|
||||
assert.deepEqual(testObject.contents, {});
|
||||
assert.deepEqual(testObject.keys, []);
|
||||
assert.deepEqual(testObject.configurationModel.contents, {});
|
||||
assert.deepEqual(testObject.configurationModel.keys, []);
|
||||
});
|
||||
|
||||
test('Test registering the same property again', () => {
|
||||
@@ -375,7 +347,7 @@ suite('CustomConfigurationModel', () => {
|
||||
}
|
||||
}
|
||||
});
|
||||
assert.equal(true, new DefaultConfigurationModel().getSectionContents('a'));
|
||||
assert.equal(true, new DefaultConfigurationModel().getValue('a'));
|
||||
});
|
||||
|
||||
test('Test registering the language property', () => {
|
||||
@@ -392,7 +364,7 @@ suite('CustomConfigurationModel', () => {
|
||||
}
|
||||
}
|
||||
});
|
||||
assert.equal(undefined, new DefaultConfigurationModel().getSectionContents('[a]'));
|
||||
assert.equal(undefined, new DefaultConfigurationModel().getValue('[a]'));
|
||||
});
|
||||
|
||||
});
|
||||
@@ -503,48 +475,4 @@ suite('ConfigurationChangeEvent', () => {
|
||||
assert.ok(actual.affectsConfiguration('[markdown]', URI.file('file2')));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('AllKeysConfigurationChangeEvent', () => {
|
||||
|
||||
test('changeEvent affects keys for any resource', () => {
|
||||
let testObject = new AllKeysConfigurationChangeEvent(['window.title', 'window.zoomLevel', 'window.restoreFullscreen', 'workbench.editor.enablePreview', 'window.restoreWindows'], ConfigurationTarget.USER, null);
|
||||
|
||||
assert.deepEqual(testObject.affectedKeys, ['window.title', 'window.zoomLevel', 'window.restoreFullscreen', 'workbench.editor.enablePreview', 'window.restoreWindows']);
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('window.zoomLevel'));
|
||||
assert.ok(testObject.affectsConfiguration('window.zoomLevel', URI.file('file1')));
|
||||
assert.ok(testObject.affectsConfiguration('window.zoomLevel', URI.file('file2')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreFullscreen'));
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreFullscreen', URI.file('file1')));
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreFullscreen', URI.file('file2')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreWindows'));
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreWindows', URI.file('file2')));
|
||||
assert.ok(testObject.affectsConfiguration('window.restoreWindows', URI.file('file1')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('window.title'));
|
||||
assert.ok(testObject.affectsConfiguration('window.title', URI.file('file1')));
|
||||
assert.ok(testObject.affectsConfiguration('window.title', URI.file('file2')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('window'));
|
||||
assert.ok(testObject.affectsConfiguration('window', URI.file('file1')));
|
||||
assert.ok(testObject.affectsConfiguration('window', URI.file('file2')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor.enablePreview'));
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor.enablePreview', URI.file('file2')));
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor.enablePreview', URI.file('file1')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor'));
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor', URI.file('file2')));
|
||||
assert.ok(testObject.affectsConfiguration('workbench.editor', URI.file('file1')));
|
||||
|
||||
assert.ok(testObject.affectsConfiguration('workbench'));
|
||||
assert.ok(testObject.affectsConfiguration('workbench', URI.file('file2')));
|
||||
assert.ok(testObject.affectsConfiguration('workbench', URI.file('file1')));
|
||||
|
||||
assert.ok(!testObject.affectsConfiguration('files'));
|
||||
assert.ok(!testObject.affectsConfiguration('files', URI.file('file1')));
|
||||
});
|
||||
});
|
||||
@@ -8,10 +8,9 @@
|
||||
import { TernarySearchTree } from 'vs/base/common/map';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { EventEmitter } from 'vs/base/common/eventEmitter';
|
||||
import { getConfigurationKeys, IConfigurationOverrides, IConfigurationService, getConfigurationValue, isConfigurationOverrides } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export class TestConfigurationService extends EventEmitter implements IConfigurationService {
|
||||
export class TestConfigurationService implements IConfigurationService {
|
||||
public _serviceBrand: any;
|
||||
|
||||
private configuration = Object.create(null);
|
||||
@@ -19,23 +18,21 @@ export class TestConfigurationService extends EventEmitter implements IConfigura
|
||||
private configurationByRoot: TernarySearchTree<any> = TernarySearchTree.forPaths<any>();
|
||||
|
||||
public reloadConfiguration<T>(): TPromise<T> {
|
||||
return TPromise.as(this.getConfiguration());
|
||||
return TPromise.as(this.getValue());
|
||||
}
|
||||
|
||||
public getConfiguration<C>(arg1?: any, arg2?: any): C {
|
||||
public getValue(arg1?: any, arg2?: any): any {
|
||||
if (arg1 && typeof arg1 === 'string') {
|
||||
return this.inspect(<string>arg1).value;
|
||||
}
|
||||
const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : void 0;
|
||||
if (overrides && overrides.resource) {
|
||||
const configForResource = this.configurationByRoot.findSubstr(overrides.resource.fsPath);
|
||||
return configForResource || this.configuration;
|
||||
}
|
||||
|
||||
return this.configuration;
|
||||
}
|
||||
|
||||
public getValue(key: string, overrides?: IConfigurationOverrides): any {
|
||||
return this.inspect(key).value;
|
||||
}
|
||||
|
||||
public updateValue(key: string, overrides?: IConfigurationOverrides): TPromise<void> {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
@@ -63,7 +60,7 @@ export class TestConfigurationService extends EventEmitter implements IConfigura
|
||||
workspaceFolder: T
|
||||
value: T,
|
||||
} {
|
||||
const config = this.getConfiguration(undefined, overrides);
|
||||
const config = this.getValue(undefined, overrides);
|
||||
|
||||
return {
|
||||
value: getConfigurationValue<T>(config, key),
|
||||
|
||||
@@ -18,6 +18,7 @@ import { EnvironmentService } from 'vs/platform/environment/node/environmentServ
|
||||
import extfs = require('vs/base/node/extfs');
|
||||
import uuid = require('vs/base/common/uuid');
|
||||
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { mkdirp } from 'vs/base/node/pfs';
|
||||
|
||||
class SettingsTestEnvironmentService extends EnvironmentService {
|
||||
|
||||
@@ -36,9 +37,9 @@ suite('ConfigurationService - Node', () => {
|
||||
const newDir = path.join(parentDir, 'config', id);
|
||||
const testFile = path.join(newDir, 'config.json');
|
||||
|
||||
extfs.mkdirp(newDir, 493, (error) => {
|
||||
callback(testFile, (callback) => extfs.del(parentDir, os.tmpdir(), () => { }, callback));
|
||||
});
|
||||
const onMkdirp = error => callback(testFile, (callback) => extfs.del(parentDir, os.tmpdir(), () => { }, callback));
|
||||
|
||||
mkdirp(newDir, 493).done(() => onMkdirp(null), error => onMkdirp(error));
|
||||
}
|
||||
|
||||
test('simple', (done: () => void) => {
|
||||
@@ -47,7 +48,7 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
const config = service.getConfiguration<{ foo: string }>();
|
||||
const config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
assert.equal(config.foo, 'bar');
|
||||
|
||||
@@ -63,7 +64,7 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
const config = service.getConfiguration<{ testworkbench: { editor: { tabs: boolean } } }>();
|
||||
const config = service.getValue<{ testworkbench: { editor: { tabs: boolean } } }>();
|
||||
assert.ok(config);
|
||||
assert.ok(config.testworkbench);
|
||||
assert.ok(config.testworkbench.editor);
|
||||
@@ -81,7 +82,7 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
const config = service.getConfiguration<{ foo: string }>();
|
||||
const config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
|
||||
service.dispose();
|
||||
@@ -98,7 +99,7 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
const config = service.getConfiguration<{ foo: string }>();
|
||||
const config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
|
||||
service.dispose();
|
||||
@@ -110,20 +111,20 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
let config = service.getConfiguration<{ foo: string }>();
|
||||
let config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
assert.equal(config.foo, 'bar');
|
||||
|
||||
fs.writeFileSync(testFile, '{ "foo": "changed" }');
|
||||
|
||||
// still outdated
|
||||
config = service.getConfiguration<{ foo: string }>();
|
||||
config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
assert.equal(config.foo, 'bar');
|
||||
|
||||
// force a reload to get latest
|
||||
service.reloadConfiguration().then(() => {
|
||||
config = service.getConfiguration<{ foo: string }>();
|
||||
config = service.getValue<{ foo: string }>();
|
||||
assert.ok(config);
|
||||
assert.equal(config.foo, 'changed');
|
||||
|
||||
@@ -156,7 +157,7 @@ suite('ConfigurationService - Node', () => {
|
||||
});
|
||||
|
||||
let serviceWithoutFile = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, '__testFile'));
|
||||
let setting = serviceWithoutFile.getConfiguration<ITestSetting>();
|
||||
let setting = serviceWithoutFile.getValue<ITestSetting>();
|
||||
|
||||
assert.ok(setting);
|
||||
assert.equal(setting.configuration.service.testSetting, 'isSet');
|
||||
@@ -166,7 +167,7 @@ suite('ConfigurationService - Node', () => {
|
||||
|
||||
const service = new ConfigurationService(new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, testFile));
|
||||
|
||||
let setting = service.getConfiguration<ITestSetting>();
|
||||
let setting = service.getValue<ITestSetting>();
|
||||
|
||||
assert.ok(setting);
|
||||
assert.equal(setting.configuration.service.testSetting, 'isSet');
|
||||
@@ -174,7 +175,7 @@ suite('ConfigurationService - Node', () => {
|
||||
fs.writeFileSync(testFile, '{ "configuration.service.testSetting": "isChanged" }');
|
||||
|
||||
service.reloadConfiguration().then(() => {
|
||||
let setting = service.getConfiguration<ITestSetting>();
|
||||
let setting = service.getValue<ITestSetting>();
|
||||
|
||||
assert.ok(setting);
|
||||
assert.equal(setting.configuration.service.testSetting, 'isChanged');
|
||||
|
||||
Reference in New Issue
Block a user