mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -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:
@@ -25,7 +25,7 @@ suite('ExtHostConfiguration', function () {
|
||||
this.lastArgs = [target, key, value];
|
||||
return TPromise.as(void 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function createExtHostConfiguration(contents: any = Object.create(null), shape?: MainThreadConfigurationShape) {
|
||||
if (!shape) {
|
||||
@@ -91,6 +91,47 @@ suite('ExtHostConfiguration', function () {
|
||||
assert.deepEqual(config.get('nested'), { config1: 42, config2: 'Das Pferd frisst kein Reis.' });
|
||||
});
|
||||
|
||||
test('can modify the returned configuration', function () {
|
||||
|
||||
const all = createExtHostConfiguration({
|
||||
'farboo': {
|
||||
'config0': true,
|
||||
'nested': {
|
||||
'config1': 42,
|
||||
'config2': 'Das Pferd frisst kein Reis.'
|
||||
},
|
||||
'config4': ''
|
||||
}
|
||||
});
|
||||
|
||||
let testObject = all.getConfiguration();
|
||||
let actual = testObject.get('farboo');
|
||||
actual['farboo1'] = 'newValue';
|
||||
assert.equal('newValue', actual['farboo1']);
|
||||
|
||||
testObject = all.getConfiguration();
|
||||
testObject['farboo']['farboo1'] = 'newValue';
|
||||
assert.equal('newValue', testObject['farboo']['farboo1']);
|
||||
|
||||
testObject = all.getConfiguration();
|
||||
testObject['farboo']['farboo1'] = 'newValue';
|
||||
assert.equal('newValue', testObject.get('farboo')['farboo1']);
|
||||
|
||||
testObject = all.getConfiguration();
|
||||
actual = testObject.inspect('farboo');
|
||||
actual['value'] = 'effectiveValue';
|
||||
assert.equal('effectiveValue', actual['value']);
|
||||
|
||||
testObject = all.getConfiguration();
|
||||
actual = testObject.get('farboo');
|
||||
assert.equal(undefined, actual['farboo1']);
|
||||
|
||||
testObject = all.getConfiguration();
|
||||
testObject['farboo']['farboo1'] = 'newValue';
|
||||
testObject = all.getConfiguration();
|
||||
assert.equal(undefined, testObject['farboo']['farboo1']);
|
||||
});
|
||||
|
||||
test('inspect in no workspace context', function () {
|
||||
const testObject = new ExtHostConfiguration(
|
||||
new class extends mock<MainThreadConfigurationShape>() { },
|
||||
|
||||
Reference in New Issue
Block a user