-
Notifications
You must be signed in to change notification settings - Fork 251
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
With typescript some of these mutations make no sense, or do they? Should I just ignore them? #5048
Comments
These mutations don't make sense indeed. If you want to filter them out, you should enable the TypeScript checker plugin F.y.i. using the TypeScript checker is a tradeoff. On the one hand, mutants will be more accurate, on the other hand, it will take more time. |
I got all those errors while using the typescript-checker. |
Could you share your config and logging after running with |
|
I can see you've installed the TypeScript checker, but you didn't configure it. Could try again? // @ts-check
/** @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */
const config = {
_comment: "This config was generated using 'stryker init'.",
testRunner: "vitest",
mutate: ["*/**/!(*.test).ts"],
+ checkers: ["typescript"],
// mutate: ["!backend/src/**/*.test.ts", "backend/src/**/dummies.ts"],
reporters: ["progress", "clear-text", "html"],
// mutator: {
// excludedMutations: ["ObjectLiteral", "BlockStatement", "StringLiteral"],
// },
}
export default config |
Somehow I got the impression from the docs that you only needed to load the plugin and not configure if you wanted something other than the default. So I copied the example config.
Nothing changed. I'm not sure what we are expecting since the code for that typescript plugin doesn't mention any of those mutations anyway. |
Here's a few mutations in very simple functions I'm having trouble with
(some output of stryker run)
^ How would wiping out the entire function body ever be something I should account for in a test?
^ Passing hard coded parameters to a library function also doesn't seem like something that would be relevant to a test.
^ This would make sense where string is used in a boolean context, but why would mutating a default argument make any sense?
The text was updated successfully, but these errors were encountered: