Covers Angular templates and Vue single-file components —
.html,.htm, and.vuefiles — making their embedded scripts first-class mutation targets.
Installing the package and listing it in plugins is the whole setup.
pnpm add -D @systemfsoftware/stryker-js-angularAdd the package name to plugins in your StrykerJS config:
import { defineConfig } from '@systemfsoftware/stryker-js/config'
export default defineConfig({
testRunner: 'vitest',
plugins: ['@systemfsoftware/stryker-js-angular'],
mutate: [
'src/**/*.html',
'src/**/*.vue',
],
})Only script regions are mutated. Each <script> in a document — a template may
hold any number of them — is handed to the core's own parser and mutated as
ordinary JavaScript or TypeScript: type and lang attributes select the
script format, defaulting to JavaScript, and the mutated script is printed back
between the tags it came from at its original offsets.
Template expressions are never parsed, never mutated, and never printed. In a
Vue component holding <template>{{ count }}</template> beside a
<script lang="ts">, only the script carries mutants.
Mutants inside the configuration objects of Angular's input, model, and
output signal functions — and of the signal query functions — break the
Angular compiler. This plugin does not suppress them. Pair it with the ignorer
package:
ignorers: ['@systemfsoftware/stryker-ignorer-angular'],- The exported surface is
strykerFrameworks: one plainFrameworkobject claiming thehtmlformat for.html,.htm, and.vue, typed against@systemfsoftware/stryker-framework-interface. - The
package.jsondeclares"strykerFramework": { "extensions": [".html", ".htm", ".vue"] }: the host reads that field from installed packages to name this package in a skip reason without importing the module. angular-html-parseris a hard dependency, resolved when the module loads — there is no peer to install and no version to reconcile.- There is no bundled ignorer: signal-configuration suppression lives in
@systemfsoftware/stryker-ignorer-angular.
Development setup and workflow: AGENTS.md.