mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following code smells reported by SonarQube:
1) Remove this redundant jump. 2) Remove this commented out code. 3) Variables should not be shadowed.
This commit is contained in:
@@ -136,7 +136,6 @@ describe('preferences related functions test', function() {
|
||||
|
||||
/* Tests */
|
||||
expect(pgBrowser.editor.getWrapperElement).toHaveBeenCalled();
|
||||
//expect($.fn.css).toHaveBeenCalledWith('font-size', '1.46em');
|
||||
|
||||
let setOptionCalls = pgBrowser.editor.setOption.calls;
|
||||
expect(setOptionCalls.count()).toEqual(Object.keys(editorOptions).length);
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('ImportExportServers', () => {
|
||||
});
|
||||
|
||||
it('export', () => {
|
||||
let schemaObj = new ImportExportSelectionSchema(
|
||||
schemaObj = new ImportExportSelectionSchema(
|
||||
{imp_exp: 'e', filename: 'test.json'});
|
||||
mount(<SchemaView
|
||||
formType='dialog'
|
||||
|
||||
@@ -136,7 +136,7 @@ describe('IndexSchema', ()=>{
|
||||
|
||||
columnSchemaObj.op_class_types = [];
|
||||
options.push({label: '', value: ''});
|
||||
status = columnSchemaObj.setOpClassTypes(options);
|
||||
columnSchemaObj.setOpClassTypes(options);
|
||||
expect(columnSchemaObj.op_class_types.length).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,7 +14,6 @@ import { createMount } from '@material-ui/core/test-utils';
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
import {messages} from '../fake_messages';
|
||||
import SchemaView from '../../../pgadmin/static/js/SchemaView';
|
||||
//import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import RowSecurityPolicySchema from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/row_security_policies/static/js/row_security_policy.ui';
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import { createMount } from '@material-ui/core/test-utils';
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
import {messages} from '../fake_messages';
|
||||
import SchemaView from '../../../pgadmin/static/js/SchemaView';
|
||||
//import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import TriggerSchema, { EventSchema } from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.ui';
|
||||
|
||||
describe('TriggerSchema', ()=>{
|
||||
|
||||
@@ -25,7 +25,6 @@ describe('ExecuteQuery', () => {
|
||||
const startTime = new Date(2018, 1, 29, 12, 15, 52);
|
||||
beforeEach(() => {
|
||||
networkMock = new MockAdapter(axios);
|
||||
// jasmine.addMatchers({jQuerytoHaveBeenCalledWith: jQuerytoHaveBeenCalledWith});
|
||||
userManagementMock = jasmine.createSpyObj('UserManagement', [
|
||||
'isPgaLoginRequired',
|
||||
'pgaLogin',
|
||||
|
||||
@@ -62,7 +62,6 @@ describe('queryToolActions', () => {
|
||||
it('calls the execute function', () => {
|
||||
queryToolActions.explainAnalyze(sqlEditorController);
|
||||
|
||||
// let explainAnalyzeQuery = 'EXPLAIN (FORMAT JSON, ANALYZE ON, VERBOSE OFF, COSTS OFF, BUFFERS OFF, TIMING OFF) ';
|
||||
const explainObject = {
|
||||
format: 'json',
|
||||
analyze: true,
|
||||
|
||||
Reference in New Issue
Block a user