-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
fix(#9341): strip invisible characters #9364
fix(#9341): strip invisible characters #9364
Conversation
@garethbowen, can you look at this one? |
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.
Thanks, this looks good to me!
Can you please also add few unit tests to prove that this works as expected. One technique I like to use is red/green testing which means you write the test which is failing, and then write the code to solve it, and see that the test goes green. Because you've already written the code I recommend commenting it out, and writing the test, and then uncommenting the code again. This gives me a lot of confidence that I've actually solved the issue.
The best place to put these unit tests is smsparser.spec.js
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 didn't realise this function wasn't tested at all! Thank you for filling that hole in the coverage.
Can you add one more test which tests that invisible characters are stripped? For example, copy one of the tests you added and add an invisible character to the input string?
…aloundoye/cht-core into 9341-strip-invisible-characters
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! Thanks for the quick turnaround.
I'll merge this as soon as the build passes.
Thanks @garethbowen |
Description
fix #9341
Code review checklist
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.