-
Notifications
You must be signed in to change notification settings - Fork 6
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
Creating unit testing for public methods #11
Conversation
the function was returning the opposite of what was intended
@@ -461,7 +461,7 @@ export class Validation implements FormValidation { | |||
|
|||
if (!this.fieldsToValidate.includes(field)) throw new Error(`Field "${field.name}" is not being validated`); | |||
|
|||
return !!this.validateField(field, silently); | |||
return !!!this.validateField(field, silently); |
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.
I think this can be: !this.validateField(field, silently);
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.
Excellent job with the tests, super well written and easy to understand what is being tested!
LGTM after Brian's suggestion
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.
nice job
commit f640879 Author: Brian Salazar <bsalazarsanchez06@gmail.com> Date: Tue Oct 22 10:32:50 2024 -0600 [SWAT-4099][Form Validation Open Source] Fix in isFieldValid (ltvco#16) * fix to send the correct value * 1.0.2 --------- Co-authored-by: Brian Salazar <briansalazar@Brians-MacBook-Pro.local> commit 4d02934 Author: Brian Salazar <bsalazarsanchez06@gmail.com> Date: Tue Oct 22 09:19:29 2024 -0600 [SWAT-4097] Remove all test related code (ltvco#15) * remove all test related code * remove the fix to apply it in a separate PR --------- Co-authored-by: Brian Salazar <briansalazar@Brians-MacBook-Pro.local> commit a51dfbe Author: Md Mohsin <77264192+Emkay2309@users.noreply.github.com> Date: Tue Oct 15 19:43:24 2024 +0530 Added pull_request_template and created issue templates for bug reports and feature_requests (ltvco#12) commit 643c385 Merge: 4ffcce2 7015f93 Author: Ale Soto <37157321+alsoto25@users.noreply.github.com> Date: Fri Sep 13 12:47:24 2024 -0600 Merge pull request ltvco#11 from AnthonyGriffith/ag_public-methods-tests commit 7015f93 Author: Anthony Griffith <agriffith@ltvco.com> Date: Wed Sep 11 11:42:20 2024 -0600 add tests to all methods commit 282d18c Author: Anthony Griffith <agriffith@ltvco.com> Date: Wed Sep 11 11:40:50 2024 -0600 fix method return the function was returning the opposite of what was intended commit 4ffcce2 Merge: edbc384 157f604 Author: Ale Soto <37157321+alsoto25@users.noreply.github.com> Date: Wed Jul 31 09:55:47 2024 -0600 Merge pull request ltvco#9 from alsoto25/main
Description
isFieldValid
method.Results