Skip to content
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

[External] Increase test coverage for dateUtil module in frontend. #3438

Merged

Conversation

yebra06
Copy link
Contributor

@yebra06 yebra06 commented Jan 7, 2025

Summary

There is currently a use case in the dateUtil module that is preventing full unit test coverage. This pull requests covers that use case to get this module to 100% coverage.

The use case is when a date string is passed into formatDate and does not have 3 parts delimited by a -. When this use case occurs, we expect to log a warning in the console and is tested by this pr.

Time to review: 5m

Changes proposed

Add a unit test case in the dateUtil.test.ts test module to cover the use case mentioned above.

Context for reviewers

This change can be tested and verified by running npm run test within the ~/frontend directory of this repository.

Additional information

You should see the following results of the unit tests.
Screenshot 2025-01-07 at 12 58 27 PM

Copy link
Collaborator

@doug-s-nava doug-s-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Freddie!

Congrats on being the first open source contributor to Simpler Grants!

✅ ✅ ✅ ✅

@doug-s-nava doug-s-nava merged commit fb99846 into HHS:main Jan 7, 2025
8 checks passed
@yebra06
Copy link
Contributor Author

yebra06 commented Jan 7, 2025

Thank you for the code review @doug-s-nava. I am happy to have contributed to this project!

@yebra06 yebra06 deleted the freddieyebra-increase-dateUtil-test-coverage branch January 7, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants