improve code coverage to 99.31%#1373
Merged
profnandaa merged 1 commit intovalidatorjs:masterfrom Jul 7, 2020
Merged
Conversation
profnandaa
reviewed
Jul 7, 2020
| if (xdata > new Date()) { | ||
| return false; | ||
| // eslint-disable-next-line max-len | ||
| } else if ((xdata.getFullYear() === yyyy) && (xdata.getMonth() === mm - 1) && (xdata.getDate() === dd)) { |
Member
There was a problem hiding this comment.
Could you explain this rewrite?
Member
There was a problem hiding this comment.
Or check if you rebased correctly with the latest master.
Member
Author
There was a problem hiding this comment.
xdata is created using yyyy, mm-1, and dd.
Getting xdata.getFullYear() and comparing it with what it was used to create it, it will always be true.
So, that line seemed redundant and of no use(it is like creating x from w, which is equal to 1 and comparing x.w with w or 1`.
profnandaa
approved these changes
Jul 7, 2020
Member
|
I did the same work to improve the coverage to 100% how can i create a new pull request without erasing @ezkemboi work ? :( |
Member
Author
|
@tux-tn, I think if you rebase from the master, it will definitely not erase. Also, there are some code changes that I made on |
Member
Member
Author
|
I will do that review 👍.
…On Sat, Jul 11, 2020, 6:22 PM Sarhan Aissi ***@***.***> wrote:
@ezkemboi <https://github.com/ezkemboi> my issue was that i already
commited my changes last week and didn't see your PR. But fixed, i already
submitted my PR including your changes. Feel free to check #1376
<#1376> and review it,
especially the changes to isIdentityCard
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1373 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALVWPH2Z5LWUDX55XV5SV6DR3B7UDANCNFSM4OQQ7V4A>
.
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve test coverage
Checklist