mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
Replace deprecated assert functions in test files. (#16945)
This commit is contained in:
@@ -364,7 +364,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
connection,
|
||||
connectionManagementService.object);
|
||||
|
||||
assert.equal(connectionAction.enabled, false, 'delete action should be disabled.');
|
||||
assert.strictEqual(connectionAction.enabled, false, 'delete action should be disabled.');
|
||||
});
|
||||
|
||||
test('RefreshConnectionAction - refresh should be called if connection status is connect', () => {
|
||||
|
||||
@@ -84,8 +84,8 @@ suite('ServerTreeView onAddConnectionProfile handler tests', () => {
|
||||
|
||||
test('isObjectExplorerConnectionUri', async () => {
|
||||
let connectionUriFalse = serverTreeView.isObjectExplorerConnectionUri('123');
|
||||
assert.equal(false, connectionUriFalse);
|
||||
assert.equal(true, serverTreeView.isObjectExplorerConnectionUri('connection:123'));
|
||||
assert.strictEqual(false, connectionUriFalse);
|
||||
assert.strictEqual(true, serverTreeView.isObjectExplorerConnectionUri('connection:123'));
|
||||
});
|
||||
|
||||
test('setExpandedState', async () => {
|
||||
|
||||
@@ -33,15 +33,15 @@ suite('Connection Utilities tests', () => {
|
||||
let conProfGroupChild = new ConnectionProfileGroup('testGroupChild', conProfGroup, 'testGroupChild', undefined, undefined);
|
||||
conProfGroup.addGroups([conProfGroupChild]);
|
||||
conProfGroupChild.addConnections([connection]);
|
||||
assert.equal(connection, ConnectionUtils.findProfileInGroup(connection, [conProfGroup]));
|
||||
assert.strictEqual(connection, ConnectionUtils.findProfileInGroup(connection, [conProfGroup]));
|
||||
});
|
||||
|
||||
test('getUriPrefix - test if getUriPrefix finds the correct prefix from fake uri name', () => {
|
||||
let testUri = 'test://testpath';
|
||||
assert.equal('test://', ConnectionUtils.getUriPrefix(testUri));
|
||||
assert.strictEqual('test://', ConnectionUtils.getUriPrefix(testUri));
|
||||
let badTestUri = '://>test#%</';
|
||||
assert.equal(ConnectionUtils.uriPrefixes.default, ConnectionUtils.getUriPrefix(badTestUri));
|
||||
assert.equal('', ConnectionUtils.getUriPrefix(undefined));
|
||||
assert.strictEqual(ConnectionUtils.uriPrefixes.default, ConnectionUtils.getUriPrefix(badTestUri));
|
||||
assert.strictEqual('', ConnectionUtils.getUriPrefix(undefined));
|
||||
|
||||
});
|
||||
|
||||
@@ -61,6 +61,6 @@ suite('Connection Utilities tests', () => {
|
||||
let testTime = '28:06:42.12';
|
||||
let testTimeInMS = 101202012;
|
||||
//should properly return the time in milliseconds.
|
||||
assert.equal(testTimeInMS, ConnectionUtils.parseTimeString(testTime));
|
||||
assert.strictEqual(testTimeInMS, ConnectionUtils.parseTimeString(testTime));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user