-
Notifications
You must be signed in to change notification settings - Fork 240
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/mutators): Implement missing AssignmentOperatorMutator #3203
Conversation
packages/instrumenter/src/mutators/assignment-operator-mutator.ts
Outdated
Show resolved
Hide resolved
packages/instrumenter/src/mutators/assignment-operator-mutator.ts
Outdated
Show resolved
Hide resolved
Great to see such a complete PR. Great job. Got some small remarks. Fix the build:
This is a formatting check, you can use
To fix that, you can update the snapshots. Use |
Thank you for the suggestions! We applied each of your remarks to the best of our understanding. All tests now pass (yay!). Please let us know if there are any other issues that need be resolved. Regards, |
@@ -75,7 +75,7 @@ function factorial(num) { | |||
|
|||
while (stryMutAct_9fa48(\\"13\\") ? i > num : stryMutAct_9fa48(\\"12\\") ? i < num : stryMutAct_9fa48(\\"11\\") ? false : (stryCov_9fa48(\\"11\\", \\"12\\", \\"13\\"), i <= num)) { | |||
// Stryker disable next-line UpdateOperator: Infinite loop | |||
o *= i++; | |||
stryMutAct_9fa48(\\"15\\") ? o /= i++ : (stryCov_9fa48(\\"15\\"), o *= i++); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh haha. Great to see your mutation is being placed correctly 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
One of the e2e tests failed, because we used a |
Thank you for helping us fix it, and guiding us through the pull request! 🎉 |
Also: 100% mutation score for this new mutator: https://dashboard.stryker-mutator.io/reports/github.com/stryker-mutator/stryker-js/master?module=instrumenter#mutant/mutators/assignment-operator-mutator.ts |
Document Stryker-JS only ??= operator (Logical nullish assignment). Added in pull request stryker-mutator#3203 in Stryker-JS repository. stryker-mutator/stryker-js#3203
…1476) Document Stryker-JS only ??= operator (Logical nullish assignment). Added in pull request #3203 in Stryker-JS repository. stryker-mutator/stryker-js#3203
This feature just released in Stryker 5.5, see https://twitter.com/stryker_mutator/status/1463193759726948358 |
This pull request contains the missing AssignmentOperatorMutator implemented for:
'+=' = '-=',
'-=' = '+=',
'=' = '/=',
'/=' = '=',
'%=' = '*=',
'<<=' = '>>=',
'>>=' = '<<=',
'&=' = '|=',
'|=' = '&=',
'&&=' = '||=',
'||=' = '&&=',
'??=' = '&&=',
This list also contains the '??=' which is not present in the Stryker-js documentation. We are not sure how the documentation should be updated to reflect this change, given that the operator might be specific to JavaScript.
@nicojs
Breaks :
instrumenter integration
should not place disabled mutants: