c8js
    Preparing search index...

    Interface Options

    interface Options {
        "100"?: boolean;
        all?: boolean;
        allowExternal?: boolean;
        branches?: number;
        c8Config?: string;
        cwd?: string | URL;
        exclude?: string | string[];
        excludeAfterRemap?: boolean;
        excludeNodeModules?: boolean;
        extension?: string | string[];
        functions?: number;
        include?: string | string[];
        lines?: number;
        mergeAsync?: boolean;
        omitRelative?: boolean;
        perFile?: boolean;
        reporterOptions?: Record<string, Record<string, unknown>>;
        reportsDirectory?: string;
        resolve?: string;
        skipFull?: boolean;
        src?: string | string[];
        statements?: number;
        tempDirectory?: string;
        useC8Config?: boolean;
        wrapperLength?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    "100"?: boolean

    Fails if coverage falls below 100%.

    false

    all?: boolean

    If true, all files specified with the options src, include, exclude and extension will be loaded into the report. If any of those files remain uncovered, they will be factored into the report with a default of 0% coverage.

    false

    allowExternal?: boolean
    branches?: number

    Percentage of branches that must be covered for the check to pass. This setting is ignored if option 100 is used.

    0

    c8Config?: string

    Path to c8 JSON configuration file. If not provided, c8js searches for files named '.c8rc', '.c8rc.json', '.nycrc', or '.nycrc.json', starting from cwd and walking up the filesystem tree. This setting is ignored if option useC8Config is set to false.

    cwd?: string | URL

    Current working directory of the subprocess, project root of reports and base directory for all relative paths. Must be an absolute path.

    process.cwd

    exclude?: string | string[]

    Glob patterns matching files that should be excluded from coverage.

    await import('@istanbuljs/schema/default-exclude.js')

    excludeAfterRemap?: boolean

    Whether to apply exclusion logic after source maps are used to remap compiled to original source files, or before.

    false

    excludeNodeModules?: boolean

    Whether or not to exclude all 'node_module' folders.

    true

    extension?: string | string[]

    Only files matching these extensions will be included in coverage.

    ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx']

    functions?: number

    Percentage of functions that must be covered for the check to pass. This setting is ignored if option 100 is used.

    0

    include?: string | string[]

    Glob patterns matching files that should be included in coverage. An empty array matches all files.

    []

    lines?: number

    Percentage of lines that must be covered for the check to pass. This setting is ignored if option 100 is used.

    90

    mergeAsync?: boolean

    Merges all V8 coverage reports asynchronously and incrementally to avoid OOM issues.

    false

    omitRelative?: boolean
    perFile?: boolean

    Checks thresholds on a per-file basis.

    false

    reporterOptions?: Record<string, Record<string, unknown>>
    reportsDirectory?: string

    Directory where coverage reports will be output to. The specified directory is ignored if none of the selected reports writes to disk. This option is used to determine the location of tempDirectory, if not specified.

    'coverage'

    resolve?: string
    skipFull?: boolean
    src?: string | string[]

    Overrides cwd as the location where source files are looked for when the option all is specified. This allows for workspaces spanning multiple projects.

    statements?: number

    Percentage of statements that must be covered for the check to pass. This setting is ignored if option 100 is used.

    0

    tempDirectory?: string

    Directory where temporary V8 coverage files are written to and read from. This directory will be created if it does not exist. Defaults to a subdirectory named 'tmp' in the directory specified by reportsDirectory.

    useC8Config?: boolean

    If false, c8js will not load c8 options from a c8 section in 'package.json', or from a JSON configuration file on disk.

    true

    wrapperLength?: number