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

feat(instrumenter): add expression mutator for Date (#4917) #4918

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

boretti
Copy link
Contributor

@boretti boretti commented Jul 31, 2024

It would be interesting to have mutation produced for operation on Date.

Expression like :

aDate.setDate(aDate.getDate()+1)

will produce interesting mutation based on the +1. It would also be interesting to have mutation changing the setDate or getDate operation (as updating month and not the day of month).

I propose to add the following mutation (to method-expression-mutator) :

  • getDate to/from getMonth
  • setDate to/from setMonth
  • getHours to/from getMinutes
  • setHours to/from setMinutes

See issue #4917

@boretti
Copy link
Contributor Author

boretti commented Aug 2, 2024

Update based on proposal in the issue.

Copy link
Member

@nicojs nicojs left a comment

Choose a reason for hiding this comment

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

The code looks great, But I first want to resolve the discussion in #4917 before merging

@boretti
Copy link
Contributor Author

boretti commented Aug 12, 2024

Updated according exchange in the issue

@nicojs nicojs enabled auto-merge (squash) August 14, 2024 14:40
@nicojs nicojs merged commit 8207ef6 into stryker-mutator:master Aug 14, 2024
7 checks passed
@nicojs
Copy link
Member

nicojs commented Aug 14, 2024

Thanks! ❤️

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