Add a few unit tests for dacpac extension (#9194)

* add a few unit tests

* fix tests for linux
This commit is contained in:
Kim Santiago
2020-02-24 10:01:30 -08:00
committed by GitHub
parent 10b681b3c8
commit 9090143f9d
9 changed files with 247 additions and 136 deletions

View File

@@ -0,0 +1,25 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'mocha';
import * as should from 'should';
import * as loc from '../localizedConstants';
import { DataTierApplicationWizard, Operation } from '../wizard/dataTierApplicationWizard';
describe('Dacfx wizard', function (): void {
it('Should initialize wizard correctly', async () => {
let wizard = new DataTierApplicationWizard();
should.notEqual(wizard.wizard, undefined);
should.equal(wizard.wizard.title, loc.wizardTitle);
wizard.setPages();
should.notEqual(wizard.pages, undefined);
should.equal(wizard.pages.size, 7);
should.equal(wizard.wizard.pages.length, 4);
wizard.setDoneButton(Operation.deploy);
should.equal(wizard.selectedOperation, Operation.deploy);
});
});