mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
[SQL-bindings] remove watcher for files (#20250)
* remove watcher for files * nit
This commit is contained in:
@@ -7,7 +7,6 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as should from 'should';
|
||||
import * as sinon from 'sinon';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azureFunctionUtils from '../../common/azureFunctionsUtils';
|
||||
import * as constants from '../../common/constants';
|
||||
@@ -90,9 +89,6 @@ describe('AzureFunctionsService', () => {
|
||||
sinon.stub(azureFunctionUtils, 'setLocalAppSetting').withArgs(sinon.match.any, 'SqlConnectionString', 'testConnectionString').resolves((true));
|
||||
sinon.stub(utils, 'executeCommand').resolves('downloaded nuget package');
|
||||
|
||||
const testWatcher = TypeMoq.Mock.ofType<vscode.FileSystemWatcher>().object;
|
||||
sinon.stub(azureFunctionUtils, 'waitForNewFunctionFile').withArgs(sinon.match.any).returns({ filePromise: Promise.resolve('TestFileCreated'), watcherDisposable: testWatcher });
|
||||
|
||||
should(connectionInfo.database).equal('my_db', 'Initial ConnectionInfo database should be my_db');
|
||||
await azureFunctionService.createAzureFunction(tableTestNode);
|
||||
|
||||
@@ -127,9 +123,6 @@ describe('AzureFunctionsService', () => {
|
||||
sinon.stub(azureFunctionUtils, 'setLocalAppSetting').withArgs(sinon.match.any, 'SqlConnectionString', 'testConnectionString').resolves((true));
|
||||
sinon.stub(utils, 'executeCommand').resolves('downloaded nuget package');
|
||||
|
||||
const testWatcher = TypeMoq.Mock.ofType<vscode.FileSystemWatcher>().object;
|
||||
sinon.stub(azureFunctionUtils, 'waitForNewFunctionFile').withArgs(sinon.match.any).returns({ filePromise: Promise.resolve('TestFileCreated'), watcherDisposable: testWatcher });
|
||||
|
||||
showErrorMessageSpy = sinon.spy(vscode.window, 'showErrorMessage'); // error message spy to be used for checking tests
|
||||
});
|
||||
|
||||
@@ -221,9 +214,6 @@ describe('AzureFunctionsService', () => {
|
||||
sinon.stub(azureFunctionUtils, 'setLocalAppSetting').withArgs(sinon.match.any, 'SqlConnectionString', 'testConnectionString').resolves((true));
|
||||
sinon.stub(utils, 'executeCommand').resolves('downloaded nuget package');
|
||||
|
||||
const testWatcher = TypeMoq.Mock.ofType<vscode.FileSystemWatcher>().object;
|
||||
sinon.stub(azureFunctionUtils, 'waitForNewFunctionFile').withArgs(sinon.match.any).returns({ filePromise: Promise.resolve('TestFileCreated'), watcherDisposable: testWatcher });
|
||||
|
||||
showErrorMessageSpy = sinon.spy(vscode.window, 'showErrorMessage'); // error message spy to be used for checking tests
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user