Skip to content

fix(job): use consistent grammar in error message#3987

Merged
roggervalf merged 1 commit intotaskforcesh:masterfrom
yogeshwaran-c:fix/job-error-message-grammar
Apr 11, 2026
Merged

fix(job): use consistent grammar in error message#3987
roggervalf merged 1 commit intotaskforcesh:masterfrom
yogeshwaran-c:fix/job-error-message-grammar

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Summary

Fixes a minor grammar inconsistency in an error message in src/classes/job.ts.

The error thrown when both delay and repeat options are provided used the awkward phrasing could not be used together, while all other similar validation error messages in the same file (e.g., for deduplication, debounce, and exclusive options) use cannot be used together.

Changes

  • src/classes/job.ts: Change Delay and repeat options could not be used together to Delay and repeat options cannot be used together
  • tests/job.test.ts: Update the corresponding test assertion to match the new error message

Test plan

  • Updated existing test in tests/job.test.ts to match the new error message
  • Verified no other references to the old string remain in the codebase

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes the grammar of a validation error message in Job.validateOptions by changing “could not be used together” to “cannot be used together”, and updates the corresponding test to match.

Changes:

  • Update the delay+repeat mutual-exclusion error message in src/classes/job.ts.
  • Update tests/job.test.ts to assert the new error string.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/classes/job.ts Aligns the delay+repeat validation error message with other “cannot be used together” messages in the same validator.
tests/job.test.ts Updates the rejection assertion to match the new error message text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roggervalf roggervalf merged commit ce9bf0d into taskforcesh:master Apr 11, 2026
25 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.73.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.20.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants