mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
getConfiguration should not crash when section denotes a value, #1396
This commit is contained in:
@@ -15,7 +15,7 @@ suite('workspace-namespace', () => {
|
||||
|
||||
teardown(cleanUp);
|
||||
|
||||
test('default configuration', () => {
|
||||
test('configuration, defaults', () => {
|
||||
const config = workspace.getConfiguration('farboo');
|
||||
|
||||
assert.ok(config.has('config0'));
|
||||
@@ -26,6 +26,11 @@ suite('workspace-namespace', () => {
|
||||
assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.');
|
||||
});
|
||||
|
||||
test('configuration, getConfig/value', () => {
|
||||
const value = workspace.getConfiguration('farboo.config0');
|
||||
assert.equal(Object.keys(value).length, 2);
|
||||
});
|
||||
|
||||
test('textDocuments', () => {
|
||||
assert.ok(Array.isArray(workspace.textDocuments));
|
||||
assert.throws(() => workspace.textDocuments = null);
|
||||
|
||||
Reference in New Issue
Block a user