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

Ordering days on parse() #305

Merged

Conversation

yoav-melamed
Copy link
Contributor

Add relevant test under the 'At' section

Comment on lines +53 to +55
if (arrayElement.length === 0) {
arrayElement.push("*");
}
Copy link
Owner

Choose a reason for hiding this comment

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

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To support the following:
it("dayOfWeek specified as comma", function () { assert.equal(new CronParser("*/5 * * * * ,").parse()[5], "*"); });

Copy link
Owner

Choose a reason for hiding this comment

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

Is that a valid syntax for a cron?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

*/5 * * * * , is an invalid syntax, this is why it parsed to */5 * * * * * which is a valid syntax.
anyhow, it was an existing test that I didn't want to break.
My challenge was to add this fix while keeping all the 212 (+1 the one I added) running.

@bradymholt bradymholt merged commit d6d5340 into bradymholt:main Nov 13, 2023
2 checks passed
@bradymholt
Copy link
Owner

Thanks!

Copy link

The changes in PR were just released in v2.42.0 🎉.

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