mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
No unused locals (#8231)
* add no unused local * fix strict null * fix compile errors * update vscode comments
This commit is contained in:
@@ -10,9 +10,6 @@ import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/br
|
||||
import { TestConnectionManagementService } from 'sql/platform/connection/test/common/testConnectionManagementService';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import { QueryInput } from 'sql/workbench/parts/query/common/queryInput';
|
||||
import { TestEditorService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
|
||||
@@ -76,8 +73,6 @@ suite('TaskUtilities', function () {
|
||||
|
||||
// Mock the workbench service to return the active tab connection
|
||||
let tabConnectionUri = 'file://test_uri';
|
||||
let editorInput = new UntitledEditorInput(URI.parse(tabConnectionUri), false, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
let queryInput = new QueryInput(undefined, editorInput, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
mockConnectionManagementService.setup(x => x.getConnectionProfile(tabConnectionUri)).returns(() => tabProfile);
|
||||
|
||||
// If I call getCurrentGlobalConnection, it should return the expected profile from the active tab
|
||||
|
||||
@@ -29,7 +29,6 @@ suite('ExtHostModelView Validation Tests', () => {
|
||||
let widgetId = 'widget_id';
|
||||
let handle = 1;
|
||||
// let viewInitialized: Deferred<void>;
|
||||
let initializedModels: IComponentShape[];
|
||||
|
||||
setup(done => {
|
||||
// Set up the MainThreadModelViewShape proxy
|
||||
@@ -222,8 +221,7 @@ suite('ExtHostModelView Validation Tests', () => {
|
||||
|
||||
test('Inserting and removing components from a container should work correctly', () => {
|
||||
// Set up the mock proxy to save the component that gets initialized so that it can be verified
|
||||
let rootComponent: IComponentShape;
|
||||
mockProxy.setup(x => x.$initializeModel(It.isAny(), It.isAny())).callback((handle, componentShape) => rootComponent = componentShape);
|
||||
mockProxy.setup(x => x.$initializeModel(It.isAny(), It.isAny()));
|
||||
mockProxy.setup(x => x.$addToContainer(It.isAny(), It.isAny(), It.isAny(), undefined)).returns(() => Promise.resolve());
|
||||
mockProxy.setup(x => x.$addToContainer(It.isAny(), It.isAny(), It.isAny(), It.isAny())).returns(() => Promise.resolve());
|
||||
mockProxy.setup(x => x.$removeFromContainer(It.isAny(), It.isAny(), It.isAny())).returns(() => Promise.resolve());
|
||||
@@ -306,8 +304,7 @@ suite('ExtHostModelView Validation Tests', () => {
|
||||
|
||||
test('Removing a component that does not exist does not fail', () => {
|
||||
// Set up the mock proxy to save the component that gets initialized so that it can be verified
|
||||
let rootComponent: IComponentShape;
|
||||
mockProxy.setup(x => x.$initializeModel(It.isAny(), It.isAny())).callback((handle, componentShape) => rootComponent = componentShape);
|
||||
mockProxy.setup(x => x.$initializeModel(It.isAny(), It.isAny()));
|
||||
mockProxy.setup(x => x.$addToContainer(It.isAny(), It.isAny(), It.isAny(), undefined)).returns(() => Promise.resolve());
|
||||
mockProxy.setup(x => x.$addToContainer(It.isAny(), It.isAny(), It.isAny(), It.isAny())).returns(() => Promise.resolve());
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ suite('MainThreadModelViewDialog Tests', () => {
|
||||
let extHostContext = <IExtHostContext>{
|
||||
getProxy: proxyType => mockExtHostModelViewDialog.object
|
||||
};
|
||||
mainThreadModelViewDialog = new MainThreadModelViewDialog(extHostContext, undefined, undefined, undefined);
|
||||
mainThreadModelViewDialog = new MainThreadModelViewDialog(extHostContext, undefined, undefined);
|
||||
|
||||
// Set up the mock dialog service
|
||||
mockDialogService = Mock.ofType(CustomDialogService, undefined);
|
||||
|
||||
@@ -42,10 +42,8 @@ suite('MainThreadNotebook Tests', () => {
|
||||
|
||||
suite('On registering a provider', () => {
|
||||
let provider: INotebookProvider;
|
||||
let registeredProviderId: string;
|
||||
setup(() => {
|
||||
mockNotebookService.setup(s => s.registerProvider(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns((id, providerImpl) => {
|
||||
registeredProviderId = id;
|
||||
provider = providerImpl;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user