mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 09:38:26 -05:00
Add a few dacpac extension tests (#10322)
* add controller test * Add a few wizard tests * Addressing comment * fix compile error
This commit is contained in:
27
extensions/dacpac/src/test/mainController.test.ts
Normal file
27
extensions/dacpac/src/test/mainController.test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as should from 'should';
|
||||
import MainController from '../controllers/mainController';
|
||||
import { TestContext, createContext } from './testContext';
|
||||
|
||||
let testContext: TestContext;
|
||||
|
||||
function createController(): MainController {
|
||||
let controller = new MainController(testContext.context);
|
||||
return controller;
|
||||
}
|
||||
|
||||
describe('MainController', function (): void {
|
||||
before(async function (): Promise<void> {
|
||||
testContext = createContext();
|
||||
});
|
||||
|
||||
it('Should create new instance successfully', async function (): Promise<void> {
|
||||
let controller: MainController;
|
||||
should.doesNotThrow(() => controller = createController());
|
||||
should.notEqual(controller.extensionContext, undefined);
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user