Question
I don't get this mutation. Why did this fail?
[2020-07-09T21:03:12.538Z] 3. [Survived] ArrowFunction
[2020-07-09T21:03:12.538Z] /src/accordion/accordion-base.tsx:77:13
[2020-07-09T21:03:12.538Z] - onClick: () => undefined,
[2020-07-09T21:03:12.538Z] + onClick: () => undefined,
Thanks for opening this issue! It turns out this is a bug unfortunately. We don't check if the content of your function is undefined, we simply replace it with undefined. In your specific scenario this causes the mutated code to be the same as your original code.
@nicojs Shall we fix this with v4?
@simondel btw, should check if
function () { }
is mutated properly, coz it will probably be mutated to the same one
@kmdrGroch Good thinking! We also thought of that and covered it:
https://github.com/stryker-mutator/stryker/blob/77b6a209955bb71fffee61919cec6b3a14db2eff/packages/instrumenter/test/unit/mutators/block-statement-mutator.spec.ts#L24-L26
Cool beans! Thanks, @simondel and @kmdrGroch
BTW, for now I changed our default to () => { }.
Most helpful comment
@simondel btw, should check if
is mutated properly, coz it will probably be mutated to the same one