mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Add persistence and connect dialog to Arc view (#11014)
* Add controller persistence and info prompting * more stuff * clean up * Add arc tests to scripts
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
import { resourceTypeToDisplayName, parseEndpoint } from '../../common/utils';
|
||||
import { resourceTypeToDisplayName, parseEndpoint, parseInstanceName } from '../../common/utils';
|
||||
|
||||
import * as loc from '../../localizedConstants';
|
||||
import { ResourceType } from '../../constants';
|
||||
@@ -44,3 +44,20 @@ describe('parseEndpoint Method Tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseInstanceName Method Tests', () => {
|
||||
it('Should parse valid instanceName with namespace correctly', function (): void {
|
||||
should(parseInstanceName('mynamespace_myinstance')).equal('myinstance');
|
||||
});
|
||||
|
||||
it('Should parse valid instanceName without namespace correctly', function (): void {
|
||||
should(parseInstanceName('myinstance')).equal('myinstance');
|
||||
});
|
||||
|
||||
it('Should return empty string when undefined value passed in', function (): void {
|
||||
should(parseInstanceName(undefined)).equal('');
|
||||
});
|
||||
|
||||
it('Should return empty string when empty string value passed in', function (): void {
|
||||
should(parseInstanceName('')).equal('');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user