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

Adding a periods overlap helper #548

Merged
merged 6 commits into from
Nov 27, 2023
Merged

Adding a periods overlap helper #548

merged 6 commits into from
Nov 27, 2023

Conversation

Beckyrose200
Copy link
Contributor

https://eaflood.atlassian.net/browse/WATER-4188

This PR is focused on adding a helper method for the two-part-tariff work. The helper method is used to determine if two dates it has been given overlap or not.

https://eaflood.atlassian.net/browse/WATER-4188

This PR is focused on adding a helper method for the two-part-tariff work. The helper method is used to determine if two dates it has been given overlap or not.
@Beckyrose200 Beckyrose200 added the enhancement New feature or request label Nov 23, 2023
@Beckyrose200 Beckyrose200 self-assigned this Nov 23, 2023
@Beckyrose200 Beckyrose200 marked this pull request as ready for review November 23, 2023 16:37
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

I think we can expand the comments a bit more and fill in the details about the params (see JSDoc comments for notes/tips).

And though I know (or I think I do) what the function would do given certain scenarios I think it'd help to have them explicitly set out in the unit tests. I've provided the ones I can think of along with some suggested period dates to use.

app/lib/general.lib.js Outdated Show resolved Hide resolved
test/lib/general.lib.test.js Outdated Show resolved Hide resolved
test/lib/general.lib.test.js Outdated Show resolved Hide resolved
test/lib/general.lib.test.js Show resolved Hide resolved
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

@Beckyrose200 Beckyrose200 merged commit 719ec12 into main Nov 27, 2023
7 checks passed
@Beckyrose200 Beckyrose200 deleted the periods-overlap-helper branch November 27, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants