Skip to main content

instrument_source

Function instrument_source 

Source
pub fn instrument_source(
    source: &str,
    path: &str,
    options: &MutationOptions,
) -> Option<Result<Instrumented, MutationError>>
Expand description

Instruments a source file of any layout that fallow mutation supports: JavaScript, TypeScript, and the script blocks of Vue, Svelte and Astro components. Returns None for another file type.

path is the root-relative path. It selects the layout and is part of each mutant id.