Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By dmkasperskiv0.1.0BSD-3-ClauseIn 1 marketplace
Finds code your Flutter or Dart tests miss, including widget and golden tests, and writes the missing tests. Preview release, not yet on pub.dev; install from GitHub and run on Linux or macOS with Dart 3.13 or newer.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Mutation testing for Flutter and Dart packages. mutant makes small, deliberate bugs in
your code — < becomes <=, a call disappears, true turns into false — runs your tests against
each one and tells you which ones no test noticed. Those are the places where a real regression
would sail through CI.
Coverage tells you which lines ran. Mutation testing tells you whether your tests would catch a change to them. That matters more than ever when an AI writes both the code and the tests: a test that only restates what the code does passes coverage, and fails here.
$ mutant run --diff origin/main
Mutation score: 81.8% (killed 18, timeout 0, survived 4, no coverage 0, no tests 0) in 13s
Surviving mutants:
lib/cart.dart:23 >= → > [3b9c80943a]
lib/cart.dart:23 100 → 101 [9676a0b1c8]
An order of exactly 100 gets no test: nothing pins the discount boundary.
flutter test — unit, widget and golden tests.Text, zero a padding) are only made where goldens can see them; when goldens fail
on clean code because of pixel differences between machines, they are re-baselined for the run and
restored afterwards. Your golden files are never changed.--diff, only the lines you
changed are mutated.mutant restore undoes an interrupted one.Preview.
mutantis not on pub.dev yet. Install it from GitHub:
dart pub global activate --source git https://github.com/dmkasperski/mutant
Once it is published: dart pub global activate mutant.
This needs Dart ≥ 3.13 (Flutter ≥ 3.47) to run the tool. Your project can be on an older Flutter:
the tool runs your tests with your project's own Flutter. If your dart is older, build it with any
Dart ≥ 3.13 (dart compile exe bin/mutant.dart -o mutant) and put the binary on your PATH, or
use the GitHub Action, which builds the tool itself.
Linux and macOS are supported. Windows is not (yet).
Run from the package root (the directory with pubspec.yaml):
| What | Command |
|---|---|
| Lines changed on your branch | mutant run --diff $(git merge-base HEAD origin/main) |
| Uncommitted changes | mutant run --diff HEAD |
| Some files | mutant run --files lib/cart.dart |
| The whole package (an audit) | mutant run --all |
| List mutants without running | mutant run --all --dry-run |
| Re-check mutants after adding tests | mutant run --all --only 3b9c80943a --only 9676a0b1c8 |
| Fail below a score | mutant run --diff origin/main --threshold 80 |
A library whose example/ app tests it too | mutant run --all --test-package example |
The project's Flutter is used for tests: fvm is detected; anything else via
--flutter "<command>". mutant --help lists every option.
Don't edit the package while a run is in progress — mutants are written into lib/ in place
and restored at the end.
| Status | Meaning |
|---|---|
killed / timeout | A test failed or hung with the mutant — the tests caught it. |
survived | Tests ran that code and still passed. A bug in your tests. |
noCoverage | No test executes that code. |
noTests | No test file imports that file at all. |
invalid | The mutant does not compile; not counted. |
Score = (killed + timeout) / (killed + timeout + survived + no coverage).
The full JSON report (one entry per mutant, which test killed it, timings) is written to
.dart_tool/mutant/reports/ — or --report-dir.
log.fine('cache miss'); // mutant:ignore
// mutant:ignore on the line or the line above; // mutant:ignore-file anywhere in a file.
Generated files (*.g.dart, *.freezed.dart, …), toString, hashCode, debugFillProperties,
dispose, asserts, logging calls and debugLabel arguments are skipped automatically. More:
--exclude <regex>.
on: pull_request
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub dmkasperski/mutant --plugin mutantPlugins from other owners that cover similar ground