mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:52:24 +00:00
Add test for eventing
This commit is contained in:
parent
2adf01f2af
commit
9e3942707e
1 changed files with 12 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import { IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig';
|
||||
import { IEditorHoverOptions, EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
import { IEditorHoverOptions, EditorOption, IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions';
|
||||
import { EditorZoom } from 'vs/editor/common/config/editorZoom';
|
||||
import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration';
|
||||
import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
|
||||
|
@ -190,4 +190,15 @@ suite('Common Editor Config', () => {
|
|||
config.updateOptions({ hover: { enabled: false } });
|
||||
assert.equal(config.options.get(EditorOption.hover).enabled, false);
|
||||
});
|
||||
|
||||
test('does not emit event when nothing changes', () => {
|
||||
const config = new TestConfiguration({ glyphMargin: true, roundedSelection: false });
|
||||
let event: IConfigurationChangedEvent | null = null;
|
||||
config.onDidChange(e => event = e);
|
||||
assert.equal(config.options.get(EditorOption.glyphMargin), true);
|
||||
|
||||
config.updateOptions({ glyphMargin: true });
|
||||
config.updateOptions({ roundedSelection: false });
|
||||
assert.equal(event, null);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue