mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-12 03:51:37 -04:00
Add azcli extension (#16029)
This commit is contained in:
26
extensions/azcli/src/test/common/utils.test.ts
Normal file
26
extensions/azcli/src/test/common/utils.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 { NoAzdataError, searchForCmd as searchForExe } from '../../common/utils';
|
||||
|
||||
describe('utils', function () {
|
||||
describe('searchForExe', function (): void {
|
||||
it('finds exe successfully', async function (): Promise<void> {
|
||||
await searchForExe('node');
|
||||
});
|
||||
it('throws for non-existent exe', async function (): Promise<void> {
|
||||
await should(searchForExe('someFakeExe')).be.rejected();
|
||||
});
|
||||
});
|
||||
|
||||
describe('NoAzdataError', function (): void {
|
||||
it('error contains message with and without links', function (): void {
|
||||
const error = new NoAzdataError();
|
||||
should(error.message).not.be.empty();
|
||||
should(error.messageWithLink).not.be.empty();
|
||||
should(error.message).not.equal(error.messageWithLink, 'Messages should not be equal');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user