forked from stryker-mutator/stryker-js
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rename mutators & enhance NodeMutatorConfiguration type #68
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9db053c
Rename mutators in the schema
dvcopae 07cd3cd
Change negation to substraction in arhitmeticop
dvcopae 4bd9bb3
Rename mutators, stable
dvcopae dc500d0
Enforce type with a generic NodeMutatorConfiguration
dvcopae 404a58e
Get rid of NodeMutatorMultiConfiguration
dvcopae 41f02a5
Move operators inside nodemutator interface
dvcopae 9dc80ad
Update conditionalLevel test name
dvcopae c77919f
Finish aritmetic through conditional operators, stable
dvcopae db78fe2
Fix arithmetic through object-literal operators, stable
dvcopae f252689
Fix up optional-chaining
dvcopae a02c87d
Finish renaming mutators
dvcopae fd642cd
Reorder stryker-core to reduce generated warnings
dvcopae 8c59f12
Use the same key for the mutator operators when there is no reason to…
dvcopae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
184 changes: 146 additions & 38 deletions
184
packages/instrumenter/src/mutation-level/default-mutation-levels.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,152 @@ | ||
{ | ||
"mutationLevels": [ | ||
{ | ||
"name": "level1", | ||
"UpdateOperator": ["Post--To++"], | ||
"EqualityOperator": ["<=To>","<=To<", "==To!=", "!=To==",">=To<"], | ||
"ArrayDeclaration": ["EmptyArrayConstructor"], | ||
"ConditionalExpression": ["BooleanExpressionToFalse", "BooleanExpressionToTrue"], | ||
"UnaryOperator": ["+To-"], | ||
"AssignmentOperator": ["??=To&&="], | ||
"ArithmeticOperator": ["/To*","%To*","*To/"], | ||
"OptionalChaining": ["OptionalCallExpression","OptionalMemberExpression"] | ||
"mutationLevels":[ | ||
{ | ||
"name":"Level1", | ||
"UpdateOperator":[ | ||
"UpdateOperator_PostfixDecrementOperator_ToPostfixIncrementOperator" | ||
], | ||
"EqualityOperator":[ | ||
"EqualityOperator_LessThanEqualOperator_ToGreatherThanOperator", | ||
"EqualityOperator_LessThanEqualOperator_Boundary", | ||
"EqualityOperator_EqualityOperator_ToInequalityOperator", | ||
"EqualityOperator_InequalityOperator_ToEqualityOperator", | ||
"EqualityOperator_GreatherThanEqualOperator_ToLessThanOperator" | ||
], | ||
"ArrayDeclaration":[ | ||
"ArrayDeclaration_ArrayConstructor_ItemsRemoval" | ||
], | ||
"ConditionalExpression":[ | ||
"ConditionalExpression_BooleanExpression_ToFalseLiteral", | ||
"ConditionalExpression_BooleanExpression_ToTrueLiteral" | ||
], | ||
"UnaryOperator":[ | ||
"UnaryOperator_UnaryPlusOperator_ToUnaryMinusOperator" | ||
], | ||
"AssignmentOperator":[ | ||
"AssignmentOperator_NullishCoalescingAssignment_ToLogicalAndAssignment" | ||
], | ||
"ArithmeticOperator":[ | ||
"ArithmeticOperator_DivisionOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_RemainderOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_MultiplicationOperator_ToDivisionOperator" | ||
], | ||
"OptionalChaining":[ | ||
"OptionalChaining_OptionalCallExpression_OptionRemoval", | ||
"OptionalChaining_OptionalMemberExpression_OptionRemoval" | ||
] | ||
}, | ||
{ | ||
"name": "level2", | ||
"UpdateOperator": ["Post--To++", "Post++To--"], | ||
"EqualityOperator": ["<=To>","<=To<", "==To!=", "!=To==",">=To<","<To>=",">=To>", "!==To===", ">To>="], | ||
"ArrayDeclaration": ["EmptyArrayConstructor"], | ||
"ConditionalExpression": ["BooleanExpressionToFalse", "BooleanExpressionToTrue","SwitchToEmpty" ], | ||
"UnaryOperator": ["+To-"], | ||
"AssignmentOperator": ["??=To&&="], | ||
"ArithmeticOperator": ["/To*","%To*","*To/", "+To-","-To+"], | ||
"OptionalChaining": ["OptionalCallExpression","OptionalMemberExpression"], | ||
"StringLiteral": ["FillString", "FillInterpolation"], | ||
"Regex": true, | ||
"BooleanLiteral": ["TrueToFalse"] | ||
"name":"Level2", | ||
"UpdateOperator":[ | ||
"UpdateOperator_PostfixDecrementOperator_ToPostfixIncrementOperator", | ||
"UpdateOperator_PostfixIncrementOperator_ToPostfixDecrementOperator" | ||
], | ||
"EqualityOperator":[ | ||
"EqualityOperator_LessThanEqualOperator_ToGreatherThanOperator", | ||
"EqualityOperator_LessThanEqualOperator_Boundary", | ||
"EqualityOperator_EqualityOperator_ToInequalityOperator", | ||
"EqualityOperator_InequalityOperator_ToEqualityOperator", | ||
"EqualityOperator_GreatherThanEqualOperator_ToLessThanOperator", | ||
"EqualityOperator_LessThanOperator_ToGreatherThanEqualOperator", | ||
"EqualityOperator_GreatherThanEqualOperator_Boundary", | ||
"EqualityOperator_StrictInequalityOperator_ToStrictEqualityOperator", | ||
"EqualityOperator_GreaterThanOperator_Boundary" | ||
], | ||
"ArrayDeclaration":[ | ||
"ArrayDeclaration_ArrayConstructor_ItemsRemoval" | ||
], | ||
"ConditionalExpression":[ | ||
"ConditionalExpression_BooleanExpression_ToFalseLiteral", | ||
"ConditionalExpression_BooleanExpression_ToTrueLiteral", | ||
"ConditionalExpression_SwitchStatementBody_Removal" | ||
], | ||
"UnaryOperator":[ | ||
"UnaryOperator_UnaryPlusOperator_ToUnaryMinusOperator" | ||
], | ||
"AssignmentOperator":[ | ||
"AssignmentOperator_NullishCoalescingAssignment_ToLogicalAndAssignment" | ||
], | ||
"ArithmeticOperator":[ | ||
"ArithmeticOperator_DivisionOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_RemainderOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_MultiplicationOperator_ToDivisionOperator", | ||
"ArithmeticOperator_AdditionOperator_ToSubtractionOperator", | ||
"ArithmeticOperator_SubtractionOperator_ToAdditionOperator" | ||
], | ||
"OptionalChaining":[ | ||
"OptionalChaining_OptionalCallExpression_OptionRemoval", | ||
"OptionalChaining_OptionalMemberExpression_OptionRemoval" | ||
], | ||
"StringLiteral":[ | ||
"StringLiteral_EmptyStringLiteral_ToFilledStringLiteral", | ||
"StringLiteral_EmptyInterpolatedString_ToFilledInterpolatedString" | ||
], | ||
"Regex":[ | ||
"Regex_Removal" | ||
], | ||
"BooleanLiteral":[ | ||
"BooleanLiteral_TrueLiteral_ToFalseLiteral" | ||
] | ||
}, | ||
{ | ||
"name": "level3", | ||
"UpdateOperator": ["Post--To++", "Post++To--"], | ||
"EqualityOperator": ["<=To>","<=To<", "==To!=", "!=To==",">=To<","<To>=",">=To>", "!==To===", ">To>=", "<To<=", ">To<="], | ||
"ArrayDeclaration": ["EmptyArrayConstructor","EmptyArray", "FilledArray"], | ||
"ConditionalExpression": ["BooleanExpressionToFalse", "BooleanExpressionToTrue","SwitchToEmpty" ], | ||
"UnaryOperator": ["+To-", "-To+"], | ||
"AssignmentOperator": ["??=To&&="], | ||
"ArithmeticOperator": ["/To*","%To*","*To/", "+To-","-To+"], | ||
"OptionalChaining": ["OptionalCallExpression","OptionalMemberExpression"], | ||
"StringLiteral": ["FillString", "FillInterpolation"], | ||
"Regex": true, | ||
"BooleanLiteral": ["TrueToFalse", "FalseToTrue", "RemoveNegation"] | ||
"name":"Level3", | ||
"UpdateOperator":[ | ||
"UpdateOperator_PostfixDecrementOperator_ToPostfixIncrementOperator", | ||
"UpdateOperator_PostfixIncrementOperator_ToPostfixDecrementOperator" | ||
], | ||
"EqualityOperator":[ | ||
"EqualityOperator_LessThanEqualOperator_ToGreatherThanOperator", | ||
"EqualityOperator_LessThanEqualOperator_Boundary", | ||
"EqualityOperator_EqualityOperator_ToInequalityOperator", | ||
"EqualityOperator_InequalityOperator_ToEqualityOperator", | ||
"EqualityOperator_GreatherThanEqualOperator_ToLessThanOperator", | ||
"EqualityOperator_LessThanOperator_ToGreatherThanEqualOperator", | ||
"EqualityOperator_GreatherThanEqualOperator_Boundary", | ||
"EqualityOperator_StrictInequalityOperator_ToStrictEqualityOperator", | ||
"EqualityOperator_GreaterThanOperator_Boundary", | ||
"EqualityOperator_LessThanOperator_Boundary", | ||
"EqualityOperator_GreaterThanOperator_ToLessThanEqualOperator" | ||
], | ||
"ArrayDeclaration":[ | ||
"ArrayDeclaration_ArrayConstructor_ItemsRemoval", | ||
"EmptyArray", | ||
"FilledArray" | ||
], | ||
"ConditionalExpression":[ | ||
"ConditionalExpression_BooleanExpression_ToFalseLiteral", | ||
"ConditionalExpression_BooleanExpression_ToTrueLiteral", | ||
"ConditionalExpression_SwitchStatementBody_Removal" | ||
], | ||
"UnaryOperator":[ | ||
"UnaryOperator_UnaryPlusOperator_ToUnaryMinusOperator", | ||
"ArithmeticOperator_SubtractionOperator_ToAdditionOperator" | ||
], | ||
"AssignmentOperator":[ | ||
"AssignmentOperator_NullishCoalescingAssignment_ToLogicalAndAssignment" | ||
], | ||
"ArithmeticOperator":[ | ||
"ArithmeticOperator_DivisionOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_RemainderOperator_ToMultiplicationOperator", | ||
"ArithmeticOperator_MultiplicationOperator_ToDivisionOperator", | ||
"ArithmeticOperator_AdditionOperator_ToSubtractionOperator", | ||
"ArithmeticOperator_SubtractionOperator_ToAdditionOperator" | ||
], | ||
"OptionalChaining":[ | ||
"OptionalChaining_OptionalCallExpression_OptionRemoval", | ||
"OptionalChaining_OptionalMemberExpression_OptionRemoval" | ||
], | ||
"StringLiteral":[ | ||
"StringLiteral_EmptyStringLiteral_ToFilledStringLiteral", | ||
"StringLiteral_EmptyInterpolatedString_ToFilledInterpolatedString" | ||
], | ||
"Regex":[ | ||
"Regex_Removal" | ||
], | ||
"BooleanLiteral":[ | ||
"BooleanLiteral_TrueLiteral_ToFalseLiteral", | ||
"BooleanLiteral_FalseLiteral_ToTrueLiteral", | ||
"BooleanLiteral_LogicalNot_Removal" | ||
] | ||
} | ||
] | ||
} | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Did we again decided to go back to the negation naming?