mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Add main controller tests for a few extensions (#11307)
* add a few tests * fix errors * undo change * move registering commands to extension.ts for dacpac and schema compare * undo createController() addition * fix whitespace
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
"relativeCoverageDir": "../../coverage",
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**",
|
||||
"**/test/**"
|
||||
"**/test/**",
|
||||
"extension.js"
|
||||
],
|
||||
"reports": [
|
||||
"cobertura",
|
||||
|
||||
@@ -65,4 +65,16 @@ describe('MainController: main controller operations', function (): void {
|
||||
const controller = new MainController(testContext.context, testContext.apiWrapper.object);
|
||||
await shouldThrowSpecificError(async () => await controller.createNewProject(), constants.projectLocationRequired);
|
||||
});
|
||||
|
||||
it('Should create new instance without error', async function (): Promise<void> {
|
||||
should.doesNotThrow(() => new MainController(testContext.context, testContext.apiWrapper.object), 'Creating controller should not throw an error');
|
||||
});
|
||||
|
||||
it('Should activate and deactivate without error', async function (): Promise<void> {
|
||||
let controller = new MainController(testContext.context, testContext.apiWrapper.object);
|
||||
should.notEqual(controller.extensionContext, undefined);
|
||||
|
||||
should.doesNotThrow(() => controller.activate(), 'activate() should not throw an error');
|
||||
should.doesNotThrow(() => controller.dispose(), 'dispose() should not throw an error');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user