---
title: "Mutation Testing With StrykerJS and AI Agents: Matt Pocock's Loop"
date: "2026-10-14"
video_id: "7696516273970089249"
tiktok_url: "https://www.tiktok.com/@mattpocockuk/video/7696516273970089249"
creator: "@mattpocockuk"
category: "Coding"
tags: ["mutation testing", "strykerjs", "typescript", "ai coding agents", "matt pocock"]
excerpt: "Matt Pocock uses StrykerJS mutation testing to find weak tests and hand survivors to an AI agent. Here is how Stryker scores work and why 100% is not the goal."
---
Mutation testing changes small pieces of your code, such as replacing a string with an empty one, and checks whether any test fails. In a TikTok from @mattpocockuk, Matt Pocock shows a StrykerJS report and describes handing the surviving mutants to an AI coding agent so it writes stronger tests. The approach is sound, but the caption misspells the tool as "striker.js," and Stryker's own docs say not every surviving mutant can be killed.

## What is StrykerJS?

StrykerJS is the JavaScript and TypeScript version of Stryker Mutator, whose tagline is "Test your tests with mutation testing." Stryker also ships Stryker.NET for C# and Stryker4s for Scala, is sponsored by Info Support, and is licensed Apache 2.0. The StrykerJS docs say it "supports most JavaScript projects, including TypeScript, React, Angular, VueJS, Svelte, and NodeJS," with runners for Jest, Vitest, Mocha, Karma, Jasmine, Cucumber and Tap.

The repository, stryker-mutator/stryker-js, was created 2016-02-12 and had 3,245 stars on 2026-10-19. The latest release is v10.0.0, published 2026-08-14.

## How is a Stryker mutation score calculated?

Stryker's docs define the states on the report:

- **Killed:** "When at least one test failed while this mutant was active."
- **Survived:** "When all tests passed while this mutant was active."
- **No coverage:** "The mutant isn't covered by one of your tests and survived as a result."

Mutation score is detected mutants (killed plus timeouts) divided by valid mutants (detected plus undetected), times 100.

The file in the video shows 35 killed, 31 survived and 4 with no coverage. That is 35 out of 70, a 50 percent mutation score, assuming no timeouts or errors for that file. Counting only covered code, it is 35 out of 66, or 53.0 percent. The video does not state either number, and it shows only one file.

## What does a surviving mutant look like?

Pocock's example is "modify this JavaScript string to just be an empty string." The report shows `"javascript"` replaced by `""` in a constant array of 13 language names. That is Stryker's StringLiteral mutator, which turns a filled string into `""` and an empty string into `"Stryker was here!"`.

The report labels it a "Static mutant," which Stryker defines as "a mutant that is executed once on startup instead of when the tests are running." A module-level `const` array is built when the file loads, so it qualifies. Static mutants need "a fresh test environment," which Stryker warns is much slower. You can skip them with `--ignoreStatic`, and ignored ones do not count toward your score.

For TypeScript, the `@stryker-mutator/typescript-checker` plugin type-checks each mutant and marks failures as `CompileError`, "so you won't have to waste time on mutants which result in a type error." Swapping one string for another usually still type-checks, so this mutant reaches the tests.

## Do you need to kill every surviving mutant?

No. Pocock says a surviving mutant "is a mutant that needs to be killed" and that afterward "you know that every one of those tests is actually catching a potential bug in your system." Stryker's equivalent mutants page disagrees. Some mutants behave exactly like the original code, and "There is no definitive way for Stryker to find and ignore them." It suggests finding them by hand, rewriting the code, or "Accept that you won't make 100%."

PIT's documentation gives the classic case: `if (i >= 1)` versus `if (i > 1)` when `i` can only be 2.

So some of the 31 survivors may be impossible to kill, and an agent told to kill all of them cannot tell those apart from real test gaps. Review the survivor list before handing it over, and set a target below 100.

## How to use mutation testing with AI agents

Pocock first raised the idea on X on 2026-08-02: "Anyone using agents/tools to do mutation testing? Seems like it would ROCK during automated review for flushing out which branches of the code are actually covered by tests." The TikTok is his follow-up after trying it.

A write-up dated the same day, "Mutation Testing for Agent-Written Code" by Sławomir Radzymiński, reports his own run with PITest on three Java services and StrykerJS with Vitest on a React frontend. By his numbers, the frontend went from a 60.26 percent to an 82.41 percent mutation score, and the Java backend from 81 to 89 percent. One parser had 100 percent line coverage and a 61.29 percent mutation score before the loop, which shows how code can run under tests without any assertion checking it. These are one person's results on one codebase.

A workable loop based on the video and Stryker's docs:

1. Run StrykerJS and filter the report to survived and no-coverage mutants.
2. Remove mutants you judge equivalent, or skip static ones with `--ignoreStatic` if they are slow.
3. Give the remaining list to your agent and ask for tests that fail under each mutant.
4. Rerun Stryker and track the score over time.

## Mutation testing tools for other languages

Pocock closes with "there are plenty of options out there depending on what language you're working in." On 2026-10-19:

- **Java:** PIT (hcoles/pitest), Apache-2.0, 1,877 stars.
- **Python:** mutmut, BSD-3-Clause, 1,492 stars.
- **Rust:** cargo-mutants, MIT, 1,343 stars.
- **C#:** Stryker.NET, Apache-2.0, 2,106 stars.
- **Scala:** Stryker4s, Apache-2.0, 217 stars.

All five had commits in the week before that date.

## Bottom line

StrykerJS is a mature, actively maintained mutation testing tool for TypeScript, and the file in the video scores 50 percent. Feeding survivors to an agent is a reasonable way to strengthen tests, but review the list first, because Stryker cannot detect equivalent mutants and recommends accepting less than 100 percent.

## Sources

- [Stryker Mutator](https://stryker-mutator.io/): project overview and license.
- [StrykerJS introduction](https://stryker-mutator.io/docs/stryker-js/introduction/): supported frameworks and runners.
- [Mutant states and metrics](https://stryker-mutator.io/docs/mutation-testing-elements/mutant-states-and-metrics/): state definitions and score formula.
- [Supported mutators](https://stryker-mutator.io/docs/mutation-testing-elements/supported-mutators/): the StringLiteral mutator.
- [Static mutants](https://stryker-mutator.io/docs/mutation-testing-elements/static-mutants/): definition and `--ignoreStatic`.
- [Equivalent mutants](https://stryker-mutator.io/docs/mutation-testing-elements/equivalent-mutants/): why 100% may be impossible.
- [TypeScript checker](https://stryker-mutator.io/docs/stryker-js/typescript-checker/): type-checking mutants.
- [stryker-mutator/stryker-js](https://github.com/stryker-mutator/stryker-js): repository and releases.
- [Matt Pocock on X](https://x.com/mattpocockuk/status/2083807120886038716): the original agent question.
- [Mutation Testing for Agent-Written Code](https://www.awesome-testing.com/2026/08/mutation-testing-for-agent-written-code): Radzymiński's results.
- [Total TypeScript](https://www.totaltypescript.com/) and [ai.engineer speaker page](https://ai.engineer/speakers/matt-pocock): Pocock's background.
- [ai-hero-dev/ai-hero](https://github.com/ai-hero-dev/ai-hero/): the AI Hero project.
- [pitest.org](https://pitest.org/) and [PIT basic concepts](https://pitest.org/quickstart/basic_concepts/): PIT and the equivalent mutant example.
- [mutmut docs](https://mutmut.readthedocs.io/en/latest/) and [mutants.rs](https://mutants.rs/): Python and Rust tools.
- GitHub repos for [pitest](https://github.com/hcoles/pitest), [mutmut](https://github.com/boxed/mutmut), [cargo-mutants](https://github.com/sourcefrog/cargo-mutants), [stryker-net](https://github.com/stryker-mutator/stryker-net) and [stryker4s](https://github.com/stryker-mutator/stryker4s): star counts and activity.


## Video description and verification notes

**The tool in this clip is StrykerJS, which the burned-in caption and the Whisper transcript both render as "striker.js", and the report on screen works out to a 50 percent mutation score under Stryker's own formula (35 killed out of 70 valid mutants), a figure the video never states. The artifact is a 57.6-second vertical clip, 1080x1920, HEVC at 60 fps across 3,456 frames at 445,427 bps, with HE-AACv2 stereo audio at 44,100 Hz and 64,190 bps, 518,576 bps overall and 3,733,753 bytes on disk. TikTok's metadata dates the post to 2026-10-14 13:33:40 UTC from uploader `mattpocockuk`, channel name "Matt Pocock", audio credited as "original sound - Matt Pocock", with a description that repeats the title "Mutation testing is AWESOME". At capture the counters read 6,807 views, 396 likes, 5 comments, 28 reposts, and 228 saves. I read all 29 extracted frames and all 204 transcript words across 13 Whisper segments; the last segment ends at 57.54 seconds against a 57.65-second audio file, so nothing was discarded. Frames 1 through 6 and 23 through 29 show the presenter alone: a bald man in round glasses and a blue plaid shirt, speaking into a podcast microphone on a boom arm, bookshelves behind him, yellow monospace captions on black bars. Frames 1 and 2 add a lower-third card reading "AIhero.dev" over "Go from Zero To AI Hero". Frames 7 through 22 split the screen. The top half is a Stryker HTML report with a filter bar reading "Killed (35)" (unchecked), "Survived (31)" (checked), and "NoCoverage (4)" (checked), above a TypeScript file containing `const SAFE_LINK_PROTOCOLS = ["http:", "https:", "mailto:"];`, a `COMMENT_LANGS` array of 13 language strings from `"typescript"` to `"plaintext"`, the line `let highlighter: Highlighter | null = null;`, and a partially cropped comment mentioning `dangerouslySetInnerHTML` above `// needs the same scrutiny.` Every string literal carries a red dot. Frame 7 shows a hover tooltip "StringLiteral Survived". Frame 8 expands that mutant into a diff, `- "javascript",` against `+ "",`, under a panel reading "StringLiteral Survived (25:3)" and "Static mutant".**

## The tool is StrykerJS, and the caption spells it "striker.js"

The narration at 51.94 seconds says "I use striker.js for TypeScript", and the caption in frame 27 prints "striker.js for TypeScript". No tool by that name matches what is on screen. The report in frames 7 through 22 uses the state names from Stryker's documentation on its three filter chips, and the "Static mutant" label in frame 8 matches a concept Stryker documents under that exact name. I am correcting the spelling: the project is Stryker.

[Stryker Mutator](https://stryker-mutator.io/) describes itself with the line "Test your tests with mutation testing" and ships three implementations: StrykerJS for JavaScript and TypeScript, Stryker.NET for C#, and Stryker4s for Scala. The site credits Info Support as the sponsor and releases under Apache 2.0. The [StrykerJS introduction](https://stryker-mutator.io/docs/stryker-js/introduction/) says it "supports most JavaScript projects, including TypeScript, React, Angular, VueJS, Svelte, and NodeJS" and lists runners for Jest, Vitest, Mocha, Karma, Jasmine, Cucumber, and Tap. The repository [stryker-mutator/stryker-js](https://github.com/stryker-mutator/stryker-js) was created 2016-02-12, is licensed Apache-2.0, and showed 3,245 stars and 301 forks when I queried the GitHub API on 2026-10-19. Its latest release is v10.0.0, published 2026-08-14, and npm lists `@stryker-mutator/core` 10.0.0 from the same day.

I could not identify the codebase on screen. A GitHub code search for `COMMENT_LANGS` together with `SAFE_LINK_PROTOCOLS` returned no public results. The `Highlighter` type and the comment about `dangerouslySetInnerHTML` point to a markdown-to-HTML component that syntax-highlights code blocks, and that is as far as the evidence goes.

## The report on screen works out to a 50 percent mutation score

Stryker's [mutant states and metrics](https://stryker-mutator.io/docs/mutation-testing-elements/mutant-states-and-metrics/) page defines the three terms on the filter bar. Killed: "When at least one test failed while this mutant was active, the mutant is killed." Survived: "When all tests passed while this mutant was active, the mutant survived." No coverage: "The mutant isn't covered by one of your tests and survived as a result." The same page defines Detected as killed plus timeout, Undetected as survived plus no coverage, Valid as detected plus undetected, and Mutation score as detected divided by valid, times 100.

Plugging in the counts visible on screen: detected is 35, undetected is 31 plus 4, so valid is 70 and the mutation score is 50.0 percent. The secondary metric, "mutation score based on covered code" (detected divided by covered), is 35 over 66, or 53.0 percent. Two caveats apply. The filter bar shows only three states, so I am assuming zero timeouts, runtime errors, compile errors, and ignored mutants for this file; any of those would change the denominator. And the counts in that bar belong to the file being viewed, so this is one file's score, and the video never shows a project-level number.

The checkbox state also explains the wall of red dots. "Killed" is unchecked while "Survived" and "NoCoverage" are checked, so the view is filtered to undetected mutants only. That is the right view for the workflow the narration describes, which is to hand the survivor list to an agent.

## The example is a static StringLiteral mutant, which Stryker treats as a special case

The narration says "it's modify this JavaScript string to just be an empty string." Frame 8 confirms the mutant: `"javascript"` replaced by `""` at line 25, column 3. That matches the StringLiteral mutator in Stryker's [supported mutators](https://stryker-mutator.io/docs/mutation-testing-elements/supported-mutators/) list, which documents two transformations: a filled string such as `"foo"` becomes `""`, and an empty string becomes `"Stryker was here!"`. Thirteen entries in `COMMENT_LANGS`, thirteen red dots, one mutant per string.

Frame 8 also labels the mutant "Static mutant". Stryker's [static mutants](https://stryker-mutator.io/docs/mutation-testing-elements/static-mutants/) page defines one as "a mutant that is executed once on startup instead of when the tests are running." A module-level `const` array fits that definition, because the array is built when the file loads, before any test runs. The docs explain the cost: Stryker's normal technique switches mutants on and off inside one test process, but a static mutant needs "a fresh test environment", which "might require a browser page refresh or the creation of a new process or app domain, which likely has a big performance impact." Stryker offers `--ignoreStatic` to skip them; ignored static mutants still appear in the HTML report but "won't count towards your mutation score." The run in this clip did not ignore them, since the mutant shows a Survived state rather than Ignored.

The "for TypeScript" part of the narration has a concrete mechanism behind it. Stryker's [TypeScript checker](https://stryker-mutator.io/docs/stryker-js/typescript-checker/) plugin, installed with `npm install --save-dev @stryker-mutator/typescript-checker`, type-checks each mutant before running tests and marks failures as `CompileError`, "so you won't have to waste time on mutants which result in a type error." Unless the array is declared `as const`, swapping one string for another keeps the element type `string`, so the checker lets this mutant through to the test run.

## Not every surviving mutant can be killed

The narration says a surviving mutant "is a mutant that needs to be killed" and that after the loop "you know that every one of those tests is actually catching a potential bug in your system." Stryker's own docs qualify both statements. The [equivalent mutants](https://stryker-mutator.io/docs/mutation-testing-elements/equivalent-mutants/) page describes mutants whose changed code behaves identically to the original and states: "There is no definitive way for Stryker to find and ignore them. There is currently also no way yet to mark them to be ignored." The page lists three options: find them by hand, "which is time consuming"; rewrite the code so the case does not occur; or "Accept that you won't make 100%." PIT's [basic concepts](https://pitest.org/quickstart/basic_concepts/) page, for the Java tool, gives the standard example, `if (i >= 1)` against `if (i > 1)` when `i` can only be 2, and adds a second class: mutants that change behaviour "outside the scope of testing", such as logging.

So some of the 31 survivors in this report may be unkillable, and an agent instructed to kill every one of them has no way to tell those apart from real gaps. The practical fix is to review the survivor list before handing it over and to set a target below 100. I am correcting the video on the absolute: a survivor is a lead, and the docs for the tool on screen say some leads are false positives by construction.

The second claim needs a narrower reading too. A killed mutant shows that at least one test fails under that specific synthetic change, which is Stryker's definition of killed. Whether that change resembles a bug someone would ship is a judgment the tool does not make.

## The agent angle traces to an August post and one practitioner's numbers

The presenter is Matt Pocock. The [Total TypeScript](https://www.totaltypescript.com/) site bio says that before creating it he "was a member of the XState core team and worked as a developer advocate at Vercel", and the [ai.engineer speaker page](https://ai.engineer/speakers/matt-pocock) lists him as creator of Total TypeScript and AI Hero. The lower-third "Go from Zero To AI Hero" matches the banner image on [ai-hero-dev/ai-hero](https://github.com/ai-hero-dev/ai-hero/), labeled "From Zero to AI Hero", and the README line "take you from zero to fully-fledged AI engineer". That repo was created 2024-12-17 and showed 1,890 stars on 2026-10-19.

The clip's framing, test suites as a feedback loop for coding agents, has a dated origin. On 2026-08-02 Pocock posted on X: "Anyone using agents/tools to do mutation testing? Seems like it would ROCK during automated review for flushing out which branches of the code are actually covered by tests." I read [that post](https://x.com/mattpocockuk/status/2083807120886038716) through the fxtwitter API mirror, which showed 87 replies, 389 likes, and 6 reposts. The TikTok, posted 2026-10-14, is the follow-up: he has since run it himself.

An article dated the same day, [Mutation Testing for Agent-Written Code](https://www.awesome-testing.com/2026/08/mutation-testing-for-agent-written-code) by Sławomir Radzymiński, quotes that post and reports the author's own run with PITest on three Java services and StrykerJS with Vitest on a React frontend. His self-reported figures: the frontend moved from a 60.26 percent to an 82.41 percent mutation score, the Java backend from 81 to 89 percent, and one SSE parser sat at 100 percent line coverage with a 61.29 percent mutation score before the loop. Those are one person's numbers on one codebase, and they match the direction the video describes. The SSE parser figure is the cleanest illustration of the point Stryker's [docs](https://stryker-mutator.io/docs/) make about coverage: a line can execute under test without any assertion checking what it did. The video's own claim, that agents "produce much more rigorous tests after this", is Pocock's experience and arrives with no numbers in the clip.

## "Plenty of options" checks out across languages

The closing line, "there are plenty of options out there depending on what language you're working in", holds up. Figures below come from the GitHub API on 2026-10-19.

- [hcoles/pitest](https://github.com/hcoles/pitest), PIT for Java and the JVM, created 2014-01-07, Apache-2.0, 1,877 stars. [pitest.org](https://pitest.org/) calls it "a state of the art mutation testing system, providing gold standard test coverage for Java and the jvm."
- [boxed/mutmut](https://github.com/boxed/mutmut), Python, created 2016-11-13, BSD-3-Clause, 1,492 stars. Its [docs](https://mutmut.readthedocs.io/en/latest/) open with "Mutmut is a mutation testing system for Python, with a strong focus on ease of use."
- [sourcefrog/cargo-mutants](https://github.com/sourcefrog/cargo-mutants), Rust, created 2021-09-08, MIT, 1,343 stars. [mutants.rs](https://mutants.rs/) describes it as "a mutation testing tool for Rust".
- Stryker's own siblings: [stryker-net](https://github.com/stryker-mutator/stryker-net) for C#, created 2018-06-06, 2,106 stars, and [stryker4s](https://github.com/stryker-mutator/stryker4s) for Scala, created 2018-06-20, 217 stars, both Apache-2.0.

All five repositories had commits pushed within the seven days before I checked (pitest on 2026-10-14, mutmut on 2026-10-15, cargo-mutants on 2026-10-13, stryker-net on 2026-10-18, stryker4s on 2026-10-19).

## Key Takeaways

- The tool on screen is StrykerJS from Stryker Mutator, Apache-2.0, 3,245 stars, latest release v10.0.0 on 2026-08-14; the caption's "striker.js" is a misspelling.
- Under Stryker's published formula the file on screen scores 50 percent: 35 killed over 70 valid mutants, with 31 survived and 4 no-coverage mutants counting as undetected.
- The demonstrated mutant swaps `"javascript"` for `""` in a module-level constant, which Stryker classes as a static mutant and runs in a fresh process at extra cost.
- Stryker's docs say equivalent mutants cannot be detected automatically and advise accepting less than 100 percent, so "every surviving mutant needs to be killed" overstates the case.
- Pocock floated the agent idea on X on 2026-08-02; a practitioner write-up dated the same day reported a React frontend moving from 60.26 to 82.41 percent mutation score with StrykerJS and agents.
- Mutation testing tools exist for Java (PIT), Python (mutmut), Rust (cargo-mutants), C# (Stryker.NET), and Scala (Stryker4s), all with commits in the week before 2026-10-19.

## Resources

- [Stryker Mutator](https://stryker-mutator.io/) establishes the project name, the "Test your tests with mutation testing" line, the three language implementations, the Info Support sponsorship, and the Apache 2.0 license.
- [StrykerJS introduction](https://stryker-mutator.io/docs/stryker-js/introduction/) establishes TypeScript support and the list of supported test runners.
- [Mutant states and metrics](https://stryker-mutator.io/docs/mutation-testing-elements/mutant-states-and-metrics/) establishes the definitions of Killed, Survived, and No coverage and the mutation score formula used for the 50 percent figure.
- [Supported mutators](https://stryker-mutator.io/docs/mutation-testing-elements/supported-mutators/) establishes the StringLiteral mutator's two transformations, including "Stryker was here!".
- [Static mutants](https://stryker-mutator.io/docs/mutation-testing-elements/static-mutants/) establishes the definition, the fresh-environment cost, and the `--ignoreStatic` behaviour.
- [Equivalent mutants](https://stryker-mutator.io/docs/mutation-testing-elements/equivalent-mutants/) establishes that Stryker cannot detect them and recommends accepting less than 100 percent.
- [TypeScript checker](https://stryker-mutator.io/docs/stryker-js/typescript-checker/) establishes the `CompileError` state for mutants that fail type checking and the install command.
- [stryker-mutator/stryker-js on GitHub](https://github.com/stryker-mutator/stryker-js) establishes the 2016-02-12 creation date, Apache-2.0 license, 3,245 stars, 301 forks, and the v10.0.0 release on 2026-08-14, cross-checked against the npm registry.
- [Matt Pocock on X, 2026-08-02](https://x.com/mattpocockuk/status/2083807120886038716) establishes the original agent-plus-mutation-testing question and its engagement counts, read through the fxtwitter API.
- [Mutation Testing for Agent-Written Code](https://www.awesome-testing.com/2026/08/mutation-testing-for-agent-written-code) establishes Radzymiński's self-reported mutation score changes with PITest and StrykerJS.
- [Total TypeScript](https://www.totaltypescript.com/) establishes Pocock's XState and Vercel background.
- [ai.engineer speaker page](https://ai.engineer/speakers/matt-pocock) establishes him as creator of Total TypeScript and AI Hero.
- [ai-hero-dev/ai-hero on GitHub](https://github.com/ai-hero-dev/ai-hero/) establishes the "From Zero to AI Hero" banner, the README intro, the 2024-12-17 creation date, and 1,890 stars.
- [pitest.org](https://pitest.org/) and [PIT basic concepts](https://pitest.org/quickstart/basic_concepts/) establish PIT's Java target and the equivalent mutation example.
- [mutmut docs](https://mutmut.readthedocs.io/en/latest/) and [mutants.rs](https://mutants.rs/) establish the Python and Rust tools' self-descriptions.
- GitHub repositories for [hcoles/pitest](https://github.com/hcoles/pitest), [boxed/mutmut](https://github.com/boxed/mutmut), [sourcefrog/cargo-mutants](https://github.com/sourcefrog/cargo-mutants), [stryker-net](https://github.com/stryker-mutator/stryker-net), and [stryker4s](https://github.com/stryker-mutator/stryker4s) establish creation dates, licenses, star counts, and last-push dates via the GitHub API on 2026-10-19.
