prosdev0107 commented on code in PR #20095:
URL: https://github.com/apache/superset/pull/20095#discussion_r896212972


##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1086,22 +1092,24 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
   // eslint-disable-next-line consistent-return
   const errorAlert = () => {
     let alertErrors: string[] = [];
-    if (isEmpty(dbErrors) === false) {
+    if (!isEmpty(dbErrors)) {

Review Comment:
   @evans 
   I tried to add the unit test for this case but couldn't do it because of 
that getValidation function is a call in a hooks and so it is invalid hook call 
in jest file. And so I add manual testing steps into the Test instructions



##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1086,22 +1092,24 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
   // eslint-disable-next-line consistent-return
   const errorAlert = () => {
     let alertErrors: string[] = [];
-    if (isEmpty(dbErrors) === false) {
+    if (!isEmpty(dbErrors)) {

Review Comment:
   @rusackas 
   I tried to add the unit test for this case but couldn't do it because of 
that getValidation function is a call in a hooks and so it is invalid hook call 
in jest file. And so I add manual testing steps into the Test instructions



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to