Comprehensive refactor of functions dealing with dates and tests reduction #40
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.
Description
The changes address the removal of duplicate date calculating functions. After the refactoring of the tests, I opted to remove the functions altogether to make the code dry. There was a dependency on those functions to sort the items on the list and so a lot of refactoring was done to minimize the amount of different functions being used in the application. Also removed the purchase urgency label for "Not yet purchased" since it was not being utilized in our app.
Related Issue
closes #39
Acceptance Criteria
Type of Changes
Updates
Before
After
Testing Steps / QA Criteria
npm run test
will run all the tests for date calculating and sorting functions. The current refactor for getDaysBetweenDates caused errors in the tests because it was not inclusive of the present date and now it is.