-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore: Test external contribution PR #35173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
1d77950
ef4beda
ecd557a
9ffdc2b
251e6b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,16 @@ export function optionsCustomValidation( | |
break; | ||
} | ||
|
||
if (!label && !value) { | ||
_isValid = false; | ||
message = { | ||
name: "ValidationError", | ||
message: | ||
"Both Name and Value can't be empty", | ||
}; | ||
break; | ||
} | ||
Comment on lines
+73
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding unit tests for the new validation condition. To ensure the robustness of the Do you want me to help you write the unit tests for this function? |
||
|
||
//Check if the required field "label" is present: | ||
if (!label) { | ||
_isValid = false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding unit tests for validation logic.
To ensure the robustness of the
validatePairs
function, consider adding unit tests to cover various scenarios.Do you want me to help you write the unit tests for this function?