Return BindingType directly from promptForBindingType (#19200)

* Return BindingType directly from promptForBindingType

* align

* Fix tests

* fix compile
This commit is contained in:
Charles Gagnon
2022-04-25 14:07:03 -07:00
committed by GitHub
parent 72a43854f8
commit d54b7b9970
6 changed files with 16 additions and 15 deletions

View File

@@ -14,6 +14,7 @@ import * as azureFunctionService from '../../services/azureFunctionsService';
import { createTestUtils, TestUtils, createTestCredentials } from '../testUtils';
import { launchAddSqlBindingQuickpick } from '../../dialogs/addSqlBindingQuickpick';
import { BindingType } from 'sql-bindings';
let testUtils: TestUtils;
const fileUri = vscode.Uri.file('testUri');
@@ -66,7 +67,7 @@ describe('Add SQL Binding quick pick', () => {
// select Azure function
let quickpickStub = sinon.stub(vscode.window, 'showQuickPick').onFirstCall().resolves({ label: 'af1' });
// select input or output binding
quickpickStub.onSecondCall().resolves({ label: constants.input });
quickpickStub.onSecondCall().resolves(<any>{ label: constants.input, type: BindingType.input });
// give object name
let inputBoxStub = sinon.stub(vscode.window, 'showInputBox').onFirstCall().resolves('dbo.table1');
// give connection string setting name
@@ -100,7 +101,7 @@ describe('Add SQL Binding quick pick', () => {
// select Azure function
quickpickStub.onFirstCall().resolves({ label: 'af1' });
// select input or output binding
quickpickStub.onSecondCall().resolves({ label: constants.input });
quickpickStub.onSecondCall().resolves(<any>{ label: constants.input, type: BindingType.input });
// give object name
let inputBoxStub = sinon.stub(vscode.window, 'showInputBox').onFirstCall().resolves('dbo.table1');