@systemfsoftware/stryker-js-angular
v0.0.0
Published
Stryker framework plugin for Angular and Vue templates: claims .html, .htm, and .vue files and instruments their embedded script regions, never template expressions.
Maintainers
Readme
@systemfsoftware/stryker-js-angular
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.
Install
pnpm add -D @systemfsoftware/stryker-js-angularAdd the package name to plugins in your StrykerJS config:
import { StrykerConfig } from '@systemfsoftware/stryker-js/config'
export default StrykerConfig.define({
testRunner: 'vitest',
plugins: ['@systemfsoftware/stryker-js-angular'],
mutate: [
'src/**/*.html',
'src/**/*.vue',
],
})What gets mutated
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.
Signal APIs
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'],Boundaries
- 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.
Contributing
Development setup and workflow: AGENTS.md.
