-
-
Notifications
You must be signed in to change notification settings - Fork 135
test: add testing for isVotingWithinLastThreeMonths function #1837
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
base: master
Are you sure you want to change the base?
Conversation
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.
- sorry, please rename
testing
totest
to follow standard naming - I don't know why I suggestedtesting
initially 😄 - you forgot to add docs (first bullet point in requirements)
- provide jsdoc for
isVotingWithinLastThreeMonths
and put there an example ofvoteInfo
argument - I think that instead of
vote_tracker_utils.js
we should rather add there a new folder, as we already have some, like maintainers- .github - scripts - vote_tracker - index.js (previously `vote_tracker.js`) - utils.js
wdyt?
I thought of this: .github
└── scripts
├── vote_tracker
│ ├── index.js # Main vote tracking logic
├── vote_utils
│ ├── utils.js # Utility functions for vote tracking This way, the core logic and utilities are separate. What do you think? |
…d jsdoc for isVotingWithinLastThreeMonths
but it ain't a big project, so does it make sense to introduce such folder structure? especially that |
Yeah, fair point. I'll follow the other one and keep it simple. And by the way, I have added the jsdoc and the |
ping me whenever ready for another review round |
Desciption
Tests Introduced
isVotingWithinLastThreeMonths
.Fixes
isVotingWithinLastThreeMonths
to correctly handle future dates given inlastVoteDate
.How to test
npm test
to execute all test cases.This PR is related to issue #1786