We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Summary
Stryker is not instrumenting "delete with nullable indexer" syntax correctly. Example source code delete myVariable?.[indexer] is instrumented as
delete myVariable?.[indexer]
delete (stryMutAct_9fa48("3390") ? myVariable[indexer] : (stryCov_9fa48("3390"), myVariable?.[indexer]));
This generated code does not operate the same as the original source causing the initial dry run test to fail.
One possible correct instrumentation would be the following:
if (stryMutAct_9fa48("3391") ? false : stryMutAct_9fa48("3390") ? true : (stryCov_9fa48("3390", "3391"), myVariable)) { if (stryMutAct_9fa48("3392")) { {} } else { stryCov_9fa48("3392"); delete myVariable[indexer]; } }
Stryker config
{ "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", "_comment": "This config was generated using 'stryker init'. Please take a look at: https://stryker-mutator.io/docs/stryker-js/configuration/ for more information.", "packageManager": "npm", "checkers": ["typescript"], "tsconfigFile": "tsconfig.json", "typescriptChecker": { "prioritizePerformanceOverAccuracy": false }, "dryRunTimeoutMinutes": 25, "reporters": [ "html", "clear-text", "progress", "dashboard" ], "commandRunner": { "command": "npm run test:stryker" }, "cleanTempDir": true, "tempDirName": "stryker-tmp", "mutate": [ "src/**/*.ts" ], "testRunner": "jest", "testRunner_comment": "Take a look at https://stryker-mutator.io/docs/stryker-js/jest-runner for information about the jest plugin.", "coverageAnalysis": "all" }
Test runner config
Stryker environment
+-- @stryker-mutator/core@8.2.4 +-- @stryker-mutator/jest-runner@8.2.3 +-- @stryker-mutator/typescript-checker@8.2.3
+-- jest@29.7.0
Your Environment
The text was updated successfully, but these errors were encountered:
Thanks! I will try to release a fix asap.
Sorry, something went wrong.
Released in 8.2.5 🚀
8.2.5
Successfully merging a pull request may close this issue.
Summary
Stryker is not instrumenting "delete with nullable indexer" syntax correctly.
Example source code
delete myVariable?.[indexer]
is instrumented asThis generated code does not operate the same as the original source causing the initial dry run test to fail.
One possible correct instrumentation would be the following:
Stryker config
Test runner config
Stryker environment
Your Environment
The text was updated successfully, but these errors were encountered: