KC's Workspace
    Preparing search index...
    interface CoverageV8Options {
        allowExternal?: boolean;
        clean?: boolean;
        cleanOnRerun?: boolean;
        enabled?: boolean;
        exclude?: string[];
        excludeAfterRemap?: boolean;
        ignoreClassMethods?: string[];
        include?: string[];
        processingConcurrency?: number;
        reporter?:
            | Arrayable<CoverageReporter>
            | (
                CoverageReporter | [CoverageReporter] | [string & {}, Record<string, unknown>] | ["json", Partial<FileOptions>] | ["html", Partial<HtmlOptions>] | ["clover", Partial<CloverOptions>] | ["cobertura", Partial<CoberturaOptions>] | ["html-spa", Partial<HtmlSpaOptions>] | ["json-summary", Partial<FileOptions>] | ["lcov", Partial<LcovOptions>] | ["lcovonly", Partial<LcovOnlyOptions>] | ["none", object] | ["teamcity", Partial<TeamcityOptions>] | ["text", Partial<TextOptions>] | ["text-lcov", Partial<ProjectOptions>] | ["text-summary", Partial<FileOptions>]
            )[];
        reportOnFailure?: boolean;
        reportsDirectory?: string;
        skipFull?: boolean;
        thresholds?: | Thresholds
        | {
            [glob: string]: Pick<
                Thresholds,
                "lines"
                | "branches"
                | "functions"
                | "statements"
                | 100,
            >;
        } & Thresholds;
        watermarks?: {
            branches?: [number, number];
            functions?: [number, number];
            lines?: [number, number];
            statements?: [number, number];
        };
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowExternal?: boolean

    Collect coverage of files outside the project root.

    false
    
    clean?: boolean

    Clean coverage results before running tests

    true
    
    cleanOnRerun?: boolean

    Clean coverage report on watch rerun

    true
    
    enabled?: boolean

    Enables coverage collection. Can be overridden using --coverage CLI option.

    false
    
    exclude?: string[]

    List of files excluded from coverage as glob patterns. Files are first checked against coverage.include.

    See Including and excluding files from coverage report for examples.

    excludeAfterRemap?: boolean

    Apply exclusions again after coverage has been remapped to original sources. This is useful when your source files are transpiled and may contain source maps of non-source files.

    Use this option when you are seeing files that show up in report even if they match your coverage.exclude patterns.

    false
    
    ignoreClassMethods?: string[]

    Set to array of class method names to ignore for coverage

    []
    
    include?: string[]

    List of files included in coverage as glob patterns. By default only files covered by tests are included.

    See Including and excluding files from coverage report for examples.

    processingConcurrency?: number

    Concurrency limit used when processing the coverage results. Defaults to Math.min(20, os.availableParallelism?.() ?? os.cpus().length)

    reporter?:
        | Arrayable<CoverageReporter>
        | (
            CoverageReporter | [CoverageReporter] | [string & {}, Record<string, unknown>] | ["json", Partial<FileOptions>] | ["html", Partial<HtmlOptions>] | ["clover", Partial<CloverOptions>] | ["cobertura", Partial<CoberturaOptions>] | ["html-spa", Partial<HtmlSpaOptions>] | ["json-summary", Partial<FileOptions>] | ["lcov", Partial<LcovOptions>] | ["lcovonly", Partial<LcovOnlyOptions>] | ["none", object] | ["teamcity", Partial<TeamcityOptions>] | ["text", Partial<TextOptions>] | ["text-lcov", Partial<ProjectOptions>] | ["text-summary", Partial<FileOptions>]
        )[]

    Coverage reporters to use. See istanbul documentation for detailed list of all reporters.

    ['text', 'html', 'clover', 'json']
    
    reportOnFailure?: boolean

    Generate coverage report even when tests fail.

    false
    
    reportsDirectory?: string

    Directory to write coverage report to

    './coverage'
    
    skipFull?: boolean

    Do not show files with 100% statement, branch, and function coverage

    false
    
    thresholds?:
        | Thresholds
        | {
            [glob: string]: Pick<
                Thresholds,
                "lines"
                | "branches"
                | "functions"
                | "statements"
                | 100,
            >;
        } & Thresholds

    Configurations for thresholds

    {
    // Thresholds for all files
    functions: 95,
    branches: 70,
    perFile: true,
    autoUpdate: true,

    // Thresholds for utilities
    'src/utils/**.ts': {
    lines: 100,
    statements: 95,
    }
    }
    watermarks?: {
        branches?: [number, number];
        functions?: [number, number];
        lines?: [number, number];
        statements?: [number, number];
    }

    Watermarks for statements, lines, branches and functions.

    Default value is [50,80] for each property.