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(excludedMutations): Implement new naming of mutators #1855

Merged
merged 11 commits into from
Nov 23, 2019

Conversation

simondel
Copy link
Member

@simondel simondel commented Nov 14, 2019

Implements the new mutator names which are defined in the handbook: https://github.com/stryker-mutator/stryker-handbook/blob/master/mutator-types.md

Fixes #1257
Fixes #1866

Migrating:

Almost every mutator has been renamed and/or split. Stryker will warn you about any deprecated mutator names in the mutator.excludedMutations section of your config.

To migrate, please run stryker to see if your project is affected. If this is the case, please take a look at the mutator types on the handbook (see above).

These are the changes:

Old mutation New mutation(s)
ArrayLiteral ArrayDeclaration
ArrayNewExpression ArrayDeclaration
BinaryExpression ArithmeticOperator, EqualityOperator, LogicalOperator
Block BlockStatement
BooleanSubstitution BooleanLiteral
DoStatement ConditionalExpression
ForStatement ConditionalExpression
IfStatement ConditionalExpression
PrefixUnaryExpression UnaryOperator, UpdateOperator, BooleanLiteral
PostfixUnaryExpression UpdateOperator
SwitchCase ConditionalExpression
WhileStatement ConditionalExpression

New mutations

Due to the migration, some new mutations were added to the javascript mutator.

  • The mutation ArrayDeclaration will now mutate new Array() to new Array([])
  • The mutation ArrayDeclaration will now mutate [] to ["Stryker was here"]

These mutations were already performed by the typescript mutator.

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.

Great job man! I love this PR 🌹❤. Just some small remarks. I love the fact that we didn't need to change e2e tests. That strengtens me in the believe that we didn't forget anything

@nicojs
Copy link
Member

nicojs commented Nov 23, 2019

Thanks! I've fixed 2 remarks and will merge when green.

@nicojs nicojs merged commit c9b3bcb into master Nov 23, 2019
@nicojs nicojs deleted the 1257-new-mutator-names branch November 23, 2019 22:29
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.

Unexpected ConditionalExpression for assignment Implement new naming of mutators
2 participants