{"id":41386959,"url":"https://github.com/christoshrousis/mutasaurus","last_synced_at":"2026-01-23T12:00:11.688Z","repository":{"id":285358618,"uuid":"957651622","full_name":"christoshrousis/mutasaurus","owner":"christoshrousis","description":"A Deno-native mutation testing library that helps you improve your test suite quality by automatically introducing mutations into your code.","archived":false,"fork":false,"pushed_at":"2025-10-28T10:27:24.000Z","size":230,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T12:21:51.856Z","etag":null,"topics":["deno","mutation-testing","testing-tool","unit-testing"],"latest_commit_sha":null,"homepage":"https://mutasaurus.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christoshrousis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-30T21:43:41.000Z","updated_at":"2025-10-28T10:27:28.000Z","dependencies_parsed_at":"2025-03-31T09:32:59.949Z","dependency_job_id":"240c3998-9381-4679-8701-b90ae73acb53","html_url":"https://github.com/christoshrousis/mutasaurus","commit_stats":null,"previous_names":["christoshrousis/mutasaurus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/christoshrousis/mutasaurus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoshrousis%2Fmutasaurus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoshrousis%2Fmutasaurus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoshrousis%2Fmutasaurus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoshrousis%2Fmutasaurus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christoshrousis","download_url":"https://codeload.github.com/christoshrousis/mutasaurus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoshrousis%2Fmutasaurus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28690612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","mutation-testing","testing-tool","unit-testing"],"created_at":"2026-01-23T12:00:07.240Z","updated_at":"2026-01-23T12:00:11.674Z","avatar_url":"https://github.com/christoshrousis.png","language":"TypeScript","readme":"# Mutasaurus\n\nA Deno mutation testing library that helps you improve your test suite quality by introducing mutations into your code\n\n## Features\n\n- 🦕 Deno-first approach\n- ⚡ High performance\n- 📊 Mutation coverage reporting\n- 🎯 Configurable mutation operators (TBD)\n- 🔍 Source map support for accurate error reporting\n\n## Quick Start\n\n```typescript\nimport { Mutasaurus } from 'jsr:@mutasaurus/mutasaurus';\n\nconst mutasaurus = new Mutasaurus();\n\nconst results = await mutasaurus.run();\nconsole.log(results);\n```\n\n## Configuration\n\nWhen starting, you will want to pass no configuration to Mutasaurus.\nBy not passing sourceFiles, mutasaurus will proceed to search for source and\ntest file configurations on it's own.\n\n#### Source files \u0026 Test Files\nWhen supplying source files and test files, mutasaurus will consider the\nprovided files as the only files it's allowed to work with.\n\nThe parameters accept glob patterns.\n\nSomething to consider:\n\nLet `m` be the number of possible mutations\nLet `t` be the number of test files\nLet `s` be the number of source files\n\nFor each mutation that's created `m`, we need to run every test file `t` against it. This creates a multiplicative relationship:\n`O(m × t)`\n\nHowever, the number of possible mutations `m` is also dependent on the number of source files `s` and the number of possible mutation points within each source file. \nIf we consider `p` as the average number of possible mutation points per source file, then:\n`m = s × p`\n\nTherefore, the total complexity relationship could be defined as:\n`O(s × p × t)`\n\nAll this is to say, if you define the relationships between the source files and the test files, you can improve the speed of\nthe mutation test harness.\n\nSo this:\n\n```typescript\nconst featureAMutations = new Mutasaurus({\n  sourceFiles: ['./src/a/1.ts', './src/a/2.ts', './src/a/3.ts'],\n  testFiles: ['./tests/a/1.test.ts', './tests/a/2.test.ts'],\n});\nconst featureBMutations = new Mutasaurus({\n  sourceFiles: ['./src/b/1.ts', './src/b/2.ts', './src/b/3.ts'],\n  testFiles: ['./tests/b/1.test.ts', './tests/b/2.test.ts'],\n});\nconst resultsA = await featureAMutations.run();\nconst resultsB = await featureBMutations.run();\n\n```\n\nwill perform better than this:\n\n```typescript\nconst mutasaurus = new Mutasaurus({\n  sourceFiles: ['./src/**/*.ts'],\n  testFiles: ['./tests/**/*.test.ts'],\n});\nconst results = await mutasaurus.run();\n```\n\n#### Exhaustive Mode\nThe test suite will only run a subset of cherry picked mutations that attempt to balance speed \u0026 accuracy.\nIf you suspect you want to run all possible permutations, you can pass a `exhaustiveMode: true` to \nMutasaurus constructor to increase the number of mutants.\n\n```typescript\nconst mutasaurus = new Mutasaurus({\n  exhaustiveMode: true\n});\n```\n\nThis will increase the `p` in `O(s × p × t)`\n\n#### Workers\nMutasaurus uses workers, to take advantage of parallel execution.\nThis will default to 4, but depending on your machine's cores and logical cores,\nyou may or may not see improvements if you alter this number.\n\n#### Persistent Workers\nThe original implementation of Mutasaurus would actually spawn a worker per \nmutation, but only run one at a time. This was inefficient as it used a lot\nof I/O. Instead of completely removing the legacy implementation, I decided\nto trial it with a config flag. After I was satisfied that it was stable, \nI then decided to flip it to default to true.\n\n#### In Memory Mutations - Incomplete, in development.\nIdeally, mutations should occur in memory, without writing mutated files to \ndisk at all. This should improve performance by skipping I/O. This is \ncurrently in development and doesn't work yet.\n\n#### Timeout\nThe amount of time you should allow a runner to go, before considering it\n\"timed-out\". Note, that some mutations can cause infinite evaluations,\nso it is suggested you don't set an arbitrarily large number here.\n\n## Examples\n\nSee: [https://mutasaurus.com/showcase](https://mutasaurus.com/showcase) for a list of mutation runs against open source projects and their results.\n\n## Development\n\nThis project assumes Deno 2.x or later.\n\n### Formatting Code\n\n```bash\ndeno task fmt\n```\n\n### Linting\n\n```bash\ndeno task lint\n```\n\n### Testing\n\n```bash\ndeno task ok\n```\n\nNote: Currently there is only a single E2E test\n\n## Road to V1\n\n- [ ] Close to parity¹ mutation support with StrykerJS.²\n- [ ] Use coverage reporting to run test suite subset to increase performance.\n- [ ] Implement StykerJS style cache system to avoid re-running whats not required.\n  \n\n## Contributing\n\nTo contribute to this project:\n- Read the project goals.\n- Write some code.\n- Make sure `deno task ok` passes.\n- Open a PR.\n\n## Project Goals\n\nThis project started as an academic endeavor to explore mutation testing in Deno's ecosystem. The core question was \"Can I create a mutation testing library written in Deno?\"\n\nMoving Forward, the guiding principles are:\n\n- **Deno-First**\n  - Built exclusively for Deno projects.\n  - Should take cues from Deno's overall mission, and align where possible.\n- **Performance-Focused**\n  - Leverages V8 isolate and Web Workers for parallel execution\n  - Smart defaults that balance coverage with execution time\n  - Configurable mutation patterns for advanced use cases such as exhaustive coverage\n  - Potential for Rust-based core components if performance demands it\n- **Developer Experience**\n  - Single-command setup and execution out of the box\n  - Clear, actionable error messages with Deno-style hints\n  - Comprehensive documentation with examples\n  - Integration with Deno's testing ecosystem\n\n¹ StrykerJS supports quite a number of mutations by default - Mutasaurus will opt out of some of those mutations in favour of a smaller subset. This could become configurable or be combined with \"exhaustive mode\" for more stricter requirements.\n² [StrykerJS](https://github.com/stryker-mutator/stryker-js) is a mature mutation testing framework for Node based JavaScript/TypeScript projects.\n\n## License\n\nMIT\n\n## Special Thanks\n\nI have used [StrykerJS](https://github.com/stryker-mutator/stryker-js) in projects historically with great success. There is no reason not to keep using StrykerJS today. 😊\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoshrousis%2Fmutasaurus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristoshrousis%2Fmutasaurus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoshrousis%2Fmutasaurus/lists"}