-
Notifications
You must be signed in to change notification settings - Fork 252
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
Strange "empty-function-body into broken-array" mutation? #153
Comments
Is that this one? On a other note, perhaps the BlockStatementMutator should not mutate block statements if they are empty or only contain spaces. @nicojs Do you agree? |
@simondel Well... in this case it does contain a I created issue stryker-mutator/stryker-html-reporter#5 for the extra character. We'll keep this issue open to fix the equivalent mutant? @bkimminich good find! Thanks for this issue! |
I did remove the 'use strict' because I thought that triggered the mutation. But it still mutated the empty block. I would just ignore empty blocks, if anything other than statements (even comments!) is in a block, it should mutate. This kind of brought the useless 'use strict' with no subsequent code to my attention. |
I just committed PR #160 to fix this issue. Unfortunately we cannot distinguish between an empty block or a block with only a comment. I choose to not mutate empty blocks in this case. Just to be clear: |
Fine for me. Plese ping me when I should re-test this! |
This looks like it wants to mutate
into
which doesn't seem like a good idea, syntax-wise with that missing closing angular bracket... or maybe it's just rendered wrong in the HTML report?
The text was updated successfully, but these errors were encountered: