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

Fix problem caused by PR #248 - startAt set in future with interval #249

Merged
merged 2 commits into from
May 18, 2024

Conversation

buzzinJohnnyBoi
Copy link

My previous pull request #248 did not take into account if startAt was in the future, as it would calculate the previous run as the startAt, which would cause the nextRun to appear to be in the future.
For this I sincerely apologize.
The fix for this is simply to check if the startAt is in the future. If this is the case, the previous run is not calculated.
Since including the if statement put the complexity of the _next function over 22, running npm run test:lint failed.
The solution to this was just to create a new function _calculatePreviousRun that will calculate the previous run only if startAt is in the past.
I also added a test in test/node/js/src/suites/options.cjs to prove that this was working.

@buzzinJohnnyBoi
Copy link
Author

buzzinJohnnyBoi commented May 18, 2024

Not quite sure why the tests are failing, npm run build:ci passes on my local machine

@buzzinJohnnyBoi
Copy link
Author

I added 3 lines of comments and the tests pass now, I guess sometimes they just need to be run again :)

@Hexagon
Copy link
Owner

Hexagon commented May 18, 2024

Looking good! The tests does that sometimes 🥳

@Hexagon Hexagon merged commit 521d4da into Hexagon:dev May 18, 2024
19 checks passed
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.

None yet

2 participants