mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-03 16:15:28 +01:00
fix tests #109516
This commit is contained in:
@@ -906,20 +906,20 @@ suite('ExtensionsActions', () => {
|
||||
});
|
||||
|
||||
test('Test UpdateAllAction when no installed extensions', () => {
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label', true);
|
||||
|
||||
assert.ok(!testObject.enabled);
|
||||
});
|
||||
|
||||
test('Test UpdateAllAction when installed extensions are not outdated', () => {
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label', true);
|
||||
instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', [aLocalExtension('a'), aLocalExtension('b')]);
|
||||
return instantiationService.get(IExtensionsWorkbenchService).queryLocal()
|
||||
.then(extensions => assert.ok(!testObject.enabled));
|
||||
});
|
||||
|
||||
test('Test UpdateAllAction when some installed extensions are outdated', () => {
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label', true);
|
||||
const local = [aLocalExtension('a', { version: '1.0.1' }), aLocalExtension('b', { version: '1.0.1' }), aLocalExtension('c', { version: '1.0.1' })];
|
||||
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
|
||||
instantiationService.stubPromise(IExtensionManagementService, 'getInstalled', local);
|
||||
@@ -939,7 +939,7 @@ suite('ExtensionsActions', () => {
|
||||
});
|
||||
|
||||
test('Test UpdateAllAction when some installed extensions are outdated and some outdated are being installed', () => {
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label', true);
|
||||
const local = [aLocalExtension('a', { version: '1.0.1' }), aLocalExtension('b', { version: '1.0.1' }), aLocalExtension('c', { version: '1.0.1' })];
|
||||
const gallery = [aGalleryExtension('a', { identifier: local[0].identifier, version: '1.0.2' }), aGalleryExtension('b', { identifier: local[1].identifier, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)];
|
||||
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
|
||||
@@ -961,7 +961,7 @@ suite('ExtensionsActions', () => {
|
||||
});
|
||||
|
||||
test('Test UpdateAllAction when some installed extensions are outdated and all outdated are being installed', () => {
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label');
|
||||
const testObject: ExtensionsActions.UpdateAllAction = instantiationService.createInstance(ExtensionsActions.UpdateAllAction, 'id', 'label', true);
|
||||
const local = [aLocalExtension('a', { version: '1.0.1' }), aLocalExtension('b', { version: '1.0.1' }), aLocalExtension('c', { version: '1.0.1' })];
|
||||
const gallery = [aGalleryExtension('a', { identifier: local[0].identifier, version: '1.0.2' }), aGalleryExtension('b', { identifier: local[1].identifier, version: '1.0.2' }), aGalleryExtension('c', local[2].manifest)];
|
||||
const workbenchService = instantiationService.get(IExtensionsWorkbenchService);
|
||||
|
||||
Reference in New Issue
Block a user