Base class that represents a code mutator.

This should not be instantiated directly, instead it should be extended.

the name of the mutator

Hierarchy (view full)

Constructors

Properties

automaticRestore: boolean = true

If true, before each call to .mutate() will check if the code is already mutated, and call restore before the mutation is applied

isMutated: boolean = false

True if the current code is mutated, false otherwise

name: string

Methods

  • Enables/disables automatic restore. Is enabled by default.

    If enabled, before each call to .mutate() will check if the code is already mutated, and call restore before the mutation is applied.

    Parameters

    • value: boolean = true

      true to enable, false to disable

    Returns void