Skip to content
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

Mutation range inconsistent with mutation-testing-schema? #11

Open
Aimless321 opened this issue Dec 19, 2024 · 1 comment
Open

Mutation range inconsistent with mutation-testing-schema? #11

Aimless321 opened this issue Dec 19, 2024 · 1 comment

Comments

@Aimless321
Copy link

I have been locally running MSP using stryker-js (stryker-mutator/stryker-js#5086).
While testing I noticed that it's currently not working if i pass the a result from discover into mutationTest.

For example turning this mutant:

{
  "files": {
    "src/utils/file-utils.ts": {
      "language": "typescript",
      "source": "some code",
      "mutants": [
        {
          "id": "2",
          "location": {
            "start": {
              "line": 8,
              "column": 32
            },
            "end": {
              "line": 8,
              "column": 64
            }
          },
          "mutatorName": "ObjectLiteral",
          "replacement": "{}",
        }
      ]
    }
  }
}

Into src/utils/file-utils.ts:8:32-8:64 and passing it to mutationTest doesn't test any mutants.

Could this be caused by the mutation-testing-schema location to have an exclusive end, and the MSP an inclusive?

@jaspervdveen
Copy link
Contributor

Good catch! I believe this originated from the StrykerJS mutate config option, where it is inclusive. https://stryker-mutator.io/docs/stryker-js/configuration/#mutate-string
It think we need to change MSP to align the location with the MTE location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants