@stryker-mutator/core
Advanced tools
Changelog
3.0.0 (2020-03-11)
stryker.conf.json
as default config file. (#2092) (2279813)1
if an error of any kind occurs.onMutationTestReportReady
event and the mutation-testing-metrics
npm package to calculate the mutation testing report metrics.This
class MyReporter {
onScoreCalculated(scoreResult) {
// => do stuff with score result
}
}
Becomes this:
import { calculateMetrics } from 'mutation-testing-metrics';
class MyReporter {
onMutationTestingReportReady(report) {
const reportMetrics = calculateMetrics(report.files);
// => do stuff with report metrics
}
}
html
reporter is now enabled by default. If you don't want to use it, be sure to override the reporters
configuration option.{
"reporters": ["progress", "clear-text"]
}
{
"dashboard": {
"reportType": "mutationScore"
}
}
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 |
Due to the migration, some new mutations were added to the javascript mutator.
new Array()
to new Array([])
[]
to ["Stryker was here"]
These mutations were already performed by the typescript mutator.
Changelog
2.4.0 (2019-11-24)