stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.55k stars 242 forks source link

expressionMutantPlacer could not place mutants with type(s): "MethodExpression" #4884

Open hugo-vrijswijk opened 5 days ago

hugo-vrijswijk commented 5 days ago

Summary

Stryker could not mutate the following statement and fully exits:

initialNodes.filter((n) => n.id === "tiptilt")[0].className = tiptiltState

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",
  "reporters": [
    "html",
    "clear-text",
    "progress"
  ],
  "testRunner": "vitest",
  "testRunner_comment": "Take a look at https://stryker-mutator.io/docs/stryker-js/vitest-runner for information about the vitest plugin.",
  "coverageAnalysis": "perTest"
}

Test runner config

Nothing special here

Stryker environment

@stryker-mutator/vitest-runner@8.2.6
vitest@1.6.0

Test runner environment

# vitest

Your Environment

software version(s)
node v20.13.1
npm 10.8.0
Operating System macos 14.5

Add stryker.log stryker.log